From 3c07d02218a5055416f776ffcd90eb87b0ab4ae1 Mon Sep 17 00:00:00 2001 From: CapsizeGlimmer <> Date: Sun, 24 May 2020 21:29:47 -0400 Subject: [PATCH] Add a dark mode to speech bubbles; consistantly use 'speech bubble' instead of 'chat bubble' --- .../element/frames/bubble_dark/bottom.png | 3 + .../frames/bubble_dark/bottom_left.png | 3 + .../frames/bubble_dark/bottom_right.png | 3 + .../element/frames/bubble_dark/left.png | 3 + .../element/frames/bubble_dark/mid.png | 3 + .../element/frames/bubble_dark/right.png | 3 + .../element/frames/bubble_dark/tail.png | 3 + .../element/frames/bubble_dark/top.png | 3 + .../element/frames/bubble_dark/top_left.png | 3 + .../element/frames/bubble_dark/top_right.png | 3 + assets/voxygen/i18n/en.ron | 1 + common/src/comp/agent.rs | 2 +- voxygen/src/hud/img_ids.rs | 33 ++- voxygen/src/hud/mod.rs | 7 +- voxygen/src/hud/overhead.rs | 193 +++++++++++------- voxygen/src/hud/settings_window.rs | 47 ++++- voxygen/src/session.rs | 4 + voxygen/src/settings.rs | 2 + 18 files changed, 227 insertions(+), 92 deletions(-) create mode 100644 assets/voxygen/element/frames/bubble_dark/bottom.png create mode 100644 assets/voxygen/element/frames/bubble_dark/bottom_left.png create mode 100644 assets/voxygen/element/frames/bubble_dark/bottom_right.png create mode 100644 assets/voxygen/element/frames/bubble_dark/left.png create mode 100644 assets/voxygen/element/frames/bubble_dark/mid.png create mode 100644 assets/voxygen/element/frames/bubble_dark/right.png create mode 100644 assets/voxygen/element/frames/bubble_dark/tail.png create mode 100644 assets/voxygen/element/frames/bubble_dark/top.png create mode 100644 assets/voxygen/element/frames/bubble_dark/top_left.png create mode 100644 assets/voxygen/element/frames/bubble_dark/top_right.png diff --git a/assets/voxygen/element/frames/bubble_dark/bottom.png b/assets/voxygen/element/frames/bubble_dark/bottom.png new file mode 100644 index 0000000000..5f2253a85f --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/bottom.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98a71bfeb1258b3cfba3528ce236fbd1f6cb6a41327ba176b43b02476606c7fc +size 140 diff --git a/assets/voxygen/element/frames/bubble_dark/bottom_left.png b/assets/voxygen/element/frames/bubble_dark/bottom_left.png new file mode 100644 index 0000000000..e95dc19f4e --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/bottom_left.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887ef372eddeff35cbd6e2d77e97b9220a51b9dd5814f1b9f780c4e64e5ea3b8 +size 193 diff --git a/assets/voxygen/element/frames/bubble_dark/bottom_right.png b/assets/voxygen/element/frames/bubble_dark/bottom_right.png new file mode 100644 index 0000000000..033fc658e3 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/bottom_right.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81b50d4071f07b24d0b82c37d1bb53e1fbf839feda632bc3419edfcbdf2337d9 +size 208 diff --git a/assets/voxygen/element/frames/bubble_dark/left.png b/assets/voxygen/element/frames/bubble_dark/left.png new file mode 100644 index 0000000000..62033229c0 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/left.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2632608c1365465c4e6dcb19963acdeec6890658b45aae5031d085b067b8627f +size 132 diff --git a/assets/voxygen/element/frames/bubble_dark/mid.png b/assets/voxygen/element/frames/bubble_dark/mid.png new file mode 100644 index 0000000000..6ca7fbf351 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/mid.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c21f661d44fcdff48c6579e69ae978654ae964d476ab24253c5dc9ab6f7cfed +size 109 diff --git a/assets/voxygen/element/frames/bubble_dark/right.png b/assets/voxygen/element/frames/bubble_dark/right.png new file mode 100644 index 0000000000..d92b45226d --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/right.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39b8d3074ef4f73027492dc8a8dd04722f0e5bd9543e470c440695153b85d8f3 +size 132 diff --git a/assets/voxygen/element/frames/bubble_dark/tail.png b/assets/voxygen/element/frames/bubble_dark/tail.png new file mode 100644 index 0000000000..4fa55e9887 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/tail.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96a54addc80798ca47b2b652e60928bfcb0c039486b3b9adf29c4538f8888172 +size 256 diff --git a/assets/voxygen/element/frames/bubble_dark/top.png b/assets/voxygen/element/frames/bubble_dark/top.png new file mode 100644 index 0000000000..f6a2dda333 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/top.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5da78e4c5e5b8556bb738d4a80debf64755a8e4f7c3d4790007b32e84bb285a +size 141 diff --git a/assets/voxygen/element/frames/bubble_dark/top_left.png b/assets/voxygen/element/frames/bubble_dark/top_left.png new file mode 100644 index 0000000000..0f139f145d --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/top_left.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:061afcd80c0d69bacdce77c322d92b575d281b951ef7051f24a150b9c049d0cf +size 171 diff --git a/assets/voxygen/element/frames/bubble_dark/top_right.png b/assets/voxygen/element/frames/bubble_dark/top_right.png new file mode 100644 index 0000000000..4fde80e6b4 --- /dev/null +++ b/assets/voxygen/element/frames/bubble_dark/top_right.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1a57638ec421508453151c1549a7c7cf197f9d7db503ec6c2f2a60c4b2275f3 +size 210 diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index c2ce3c3618..7dcd1b08b1 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -238,6 +238,7 @@ Enjoy your stay in the World of Veloren."#, "hud.settings.cumulated_damage": "Cumulated Damage", "hud.settings.incoming_damage": "Incoming Damage", "hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage", + "hud.settings.speech_bubble_dark_mode": "Speech Bubble Dark Mode", "hud.settings.energybar_numbers": "Energybar Numbers", "hud.settings.values": "Values", "hud.settings.percentages": "Percentages", diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index a98c38e2f8..90be10bb0b 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -86,7 +86,7 @@ impl Default for Activity { fn default() -> Self { Activity::Idle(Vec2::zero()) } } -/// Default duration in seconds of chat bubbles +/// Default duration in seconds of speech bubbles pub const SPEECH_BUBBLE_DURATION: f64 = 5.0; /// Adds a speech bubble to the entity diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index bec188275e..9417722fe4 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -272,17 +272,28 @@ image_ids! { progress_frame: "voxygen.element.frames.progress_bar", progress: "voxygen.element.misc_bg.progress", - // Chat bubbles - chat_bubble_top_left: "voxygen.element.frames.bubble.top_left", - chat_bubble_top: "voxygen.element.frames.bubble.top", - chat_bubble_top_right: "voxygen.element.frames.bubble.top_right", - chat_bubble_left: "voxygen.element.frames.bubble.left", - chat_bubble_mid: "voxygen.element.frames.bubble.mid", - chat_bubble_right: "voxygen.element.frames.bubble.right", - chat_bubble_bottom_left: "voxygen.element.frames.bubble.bottom_left", - chat_bubble_bottom: "voxygen.element.frames.bubble.bottom", - chat_bubble_bottom_right: "voxygen.element.frames.bubble.bottom_right", - chat_bubble_tail: "voxygen.element.frames.bubble.tail", + // Speech bubbles + speech_bubble_top_left: "voxygen.element.frames.bubble.top_left", + speech_bubble_top: "voxygen.element.frames.bubble.top", + speech_bubble_top_right: "voxygen.element.frames.bubble.top_right", + speech_bubble_left: "voxygen.element.frames.bubble.left", + speech_bubble_mid: "voxygen.element.frames.bubble.mid", + speech_bubble_right: "voxygen.element.frames.bubble.right", + speech_bubble_bottom_left: "voxygen.element.frames.bubble.bottom_left", + speech_bubble_bottom: "voxygen.element.frames.bubble.bottom", + speech_bubble_bottom_right: "voxygen.element.frames.bubble.bottom_right", + speech_bubble_tail: "voxygen.element.frames.bubble.tail", + + dark_bubble_top_left: "voxygen.element.frames.bubble_dark.top_left", + dark_bubble_top: "voxygen.element.frames.bubble_dark.top", + dark_bubble_top_right: "voxygen.element.frames.bubble_dark.top_right", + dark_bubble_left: "voxygen.element.frames.bubble_dark.left", + dark_bubble_mid: "voxygen.element.frames.bubble_dark.mid", + dark_bubble_right: "voxygen.element.frames.bubble_dark.right", + dark_bubble_bottom_left: "voxygen.element.frames.bubble_dark.bottom_left", + dark_bubble_bottom: "voxygen.element.frames.bubble_dark.bottom", + dark_bubble_bottom_right: "voxygen.element.frames.bubble_dark.bottom_right", + dark_bubble_tail: "voxygen.element.frames.bubble_dark.tail", nothing: (), diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index f6bd1afdf3..eb2690aad6 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -235,6 +235,7 @@ pub enum Event { Sct(bool), SctPlayerBatch(bool), SctDamageBatch(bool), + SpeechBubbleDarkMode(bool), ToggleDebug(bool), UiScale(ScaleChange), CharacterSelection, @@ -944,13 +945,14 @@ impl Hud { ); let ingame_pos = pos + Vec3::unit_z() * height_offset; - // Chat bubble, name, level, and hp bars + // Speech bubble, name, level, and hp bars overhead::Overhead::new( &name, bubble, stats, energy, own_level, + &global_state.settings.gameplay, self.pulse, &self.imgs, &self.fonts, @@ -1626,6 +1628,9 @@ impl Hud { .set(self.ids.settings_window, ui_widgets) { match event { + settings_window::Event::SpeechBubbleDarkMode(sbdm) => { + events.push(Event::SpeechBubbleDarkMode(sbdm)); + }, settings_window::Event::Sct(sct) => { events.push(Event::Sct(sct)); }, diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index e46c07423e..9466fcde50 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -1,5 +1,8 @@ use super::{img_ids::Imgs, HP_COLOR, LOW_HP_COLOR, MANA_COLOR}; -use crate::ui::{fonts::ConrodVoxygenFonts, Ingameable}; +use crate::{ + settings::GameplaySettings, + ui::{fonts::ConrodVoxygenFonts, Ingameable}, +}; use common::comp::{Energy, SpeechBubble, Stats}; use conrod_core::{ position::Align, @@ -9,19 +12,19 @@ use conrod_core::{ widget_ids! { struct Ids { - // Chat bubble - chat_bubble_text, - chat_bubble_text2, - chat_bubble_top_left, - chat_bubble_top, - chat_bubble_top_right, - chat_bubble_left, - chat_bubble_mid, - chat_bubble_right, - chat_bubble_bottom_left, - chat_bubble_bottom, - chat_bubble_bottom_right, - chat_bubble_tail, + // Speech bubble + speech_bubble_text, + speech_bubble_text2, + speech_bubble_top_left, + speech_bubble_top, + speech_bubble_top_right, + speech_bubble_left, + speech_bubble_mid, + speech_bubble_right, + speech_bubble_bottom_left, + speech_bubble_bottom, + speech_bubble_bottom_right, + speech_bubble_tail, // Name name_bg, @@ -46,6 +49,7 @@ pub struct Overhead<'a> { stats: &'a Stats, energy: &'a Energy, own_level: u32, + settings: &'a GameplaySettings, pulse: f32, imgs: &'a Imgs, fonts: &'a ConrodVoxygenFonts, @@ -60,6 +64,7 @@ impl<'a> Overhead<'a> { stats: &'a Stats, energy: &'a Energy, own_level: u32, + settings: &'a GameplaySettings, pulse: f32, imgs: &'a Imgs, fonts: &'a ConrodVoxygenFonts, @@ -70,6 +75,7 @@ impl<'a> Overhead<'a> { stats, energy, own_level, + settings, pulse, imgs, fonts, @@ -130,77 +136,122 @@ impl<'a> Widget for Overhead<'a> { .x_y(0.0, MANA_BAR_Y + 50.0) .set(state.ids.name, ui); + // Speech bubble if let Some(bubble) = self.bubble { - // Speech bubble + let dark_mode = self.settings.speech_bubble_dark_mode; let mut text = Text::new(&bubble.message) .font_id(self.fonts.cyri.conrod_id) .font_size(18) - .color(Color::Rgba(0.0, 0.0, 0.0, 1.0)) .up_from(state.ids.name, 10.0) .x_align_to(state.ids.name, Align::Middle) .parent(id); + text = if dark_mode { + text.color(Color::Rgba(1.0, 1.0, 1.0, 1.0)) + } else { + text.color(Color::Rgba(0.0, 0.0, 0.0, 1.0)) + }; if let Some(w) = text.get_w(ui) { if w > 250.0 { text = text.w(250.0); } } - Image::new(self.imgs.chat_bubble_top_left) - .w_h(10.0, 10.0) - .top_left_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_top_left, ui); - Image::new(self.imgs.chat_bubble_top) - .h(10.0) - .w_of(state.ids.chat_bubble_text) - .mid_top_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_top, ui); - Image::new(self.imgs.chat_bubble_top_right) - .w_h(10.0, 10.0) - .top_right_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_top_right, ui); - Image::new(self.imgs.chat_bubble_left) - .w(10.0) - .h_of(state.ids.chat_bubble_text) - .mid_left_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_left, ui); - Image::new(self.imgs.chat_bubble_mid) - .wh_of(state.ids.chat_bubble_text) - .top_left_of(state.ids.chat_bubble_text) - .parent(id) - .set(state.ids.chat_bubble_mid, ui); - Image::new(self.imgs.chat_bubble_right) - .w(10.0) - .h_of(state.ids.chat_bubble_text) - .mid_right_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_right, ui); - Image::new(self.imgs.chat_bubble_bottom_left) - .w_h(10.0, 10.0) - .bottom_left_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_bottom_left, ui); - Image::new(self.imgs.chat_bubble_bottom) - .h(10.0) - .w_of(state.ids.chat_bubble_text) - .mid_bottom_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_bottom, ui); - Image::new(self.imgs.chat_bubble_bottom_right) - .w_h(10.0, 10.0) - .bottom_right_with_margin_on(state.ids.chat_bubble_text, -10.0) - .parent(id) - .set(state.ids.chat_bubble_bottom_right, ui); - let tail = Image::new(self.imgs.chat_bubble_tail) - .w_h(11.0, 16.0) - .mid_bottom_with_margin_on(state.ids.chat_bubble_text, -16.0) - .parent(id); + Image::new(if dark_mode { + self.imgs.dark_bubble_top_left + } else { + self.imgs.speech_bubble_top_left + }) + .w_h(10.0, 10.0) + .top_left_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_top_left, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_top + } else { + self.imgs.speech_bubble_top + }) + .h(10.0) + .w_of(state.ids.speech_bubble_text) + .mid_top_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_top, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_top_right + } else { + self.imgs.speech_bubble_top_right + }) + .w_h(10.0, 10.0) + .top_right_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_top_right, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_left + } else { + self.imgs.speech_bubble_left + }) + .w(10.0) + .h_of(state.ids.speech_bubble_text) + .mid_left_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_left, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_mid + } else { + self.imgs.speech_bubble_mid + }) + .wh_of(state.ids.speech_bubble_text) + .top_left_of(state.ids.speech_bubble_text) + .parent(id) + .set(state.ids.speech_bubble_mid, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_right + } else { + self.imgs.speech_bubble_right + }) + .w(10.0) + .h_of(state.ids.speech_bubble_text) + .mid_right_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_right, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_bottom_left + } else { + self.imgs.speech_bubble_bottom_left + }) + .w_h(10.0, 10.0) + .bottom_left_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_bottom_left, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_bottom + } else { + self.imgs.speech_bubble_bottom + }) + .h(10.0) + .w_of(state.ids.speech_bubble_text) + .mid_bottom_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_bottom, ui); + Image::new(if dark_mode { + self.imgs.dark_bubble_bottom_right + } else { + self.imgs.speech_bubble_bottom_right + }) + .w_h(10.0, 10.0) + .bottom_right_with_margin_on(state.ids.speech_bubble_text, -10.0) + .parent(id) + .set(state.ids.speech_bubble_bottom_right, ui); + let tail = Image::new(if dark_mode { + self.imgs.dark_bubble_tail + } else { + self.imgs.speech_bubble_tail + }) + .w_h(11.0, 16.0) + .mid_bottom_with_margin_on(state.ids.speech_bubble_text, -16.0) + .parent(id); // Move text to front (conrod depth is lowest first; not a z-index) - tail.set(state.ids.chat_bubble_tail, ui); + tail.set(state.ids.speech_bubble_tail, ui); text.depth(tail.get_depth() - 1.0) - .set(state.ids.chat_bubble_text, ui); + .set(state.ids.speech_bubble_text, ui); } let hp_percentage = diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 4279d7b964..c4f5643878 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -153,6 +153,8 @@ widget_ids! { sct_num_dur_text, sct_num_dur_slider, sct_num_dur_value, + speech_bubble_dark_mode_text, + speech_bubble_dark_mode_button, free_look_behavior_text, free_look_behavior_list } @@ -235,6 +237,7 @@ pub enum Event { Sct(bool), SctPlayerBatch(bool), SctDamageBatch(bool), + SpeechBubbleDarkMode(bool), ChangeLanguage(LanguageMetadata), ChangeBinding(GameInput), ChangeFreeLookBehavior(PressBehavior), @@ -943,17 +946,45 @@ impl<'a> Widget for SettingsWindow<'a> { .set(state.ids.sct_batch_inc_text, ui); } + // Speech bubble dark mode + let speech_bubble_dark_mode = ToggleButton::new( + self.global_state.settings.gameplay.speech_bubble_dark_mode, + self.imgs.checkbox, + self.imgs.checkbox_checked, + ) + .down_from( + if self.global_state.settings.gameplay.sct { + state.ids.sct_batch_inc_radio + } else { + state.ids.sct_show_radio + }, + 20.0, + ) + .x(0.0) + .w_h(18.0, 18.0) + .hover_images(self.imgs.checkbox_mo, self.imgs.checkbox_checked_mo) + .press_images(self.imgs.checkbox_press, self.imgs.checkbox_checked) + .set(state.ids.speech_bubble_dark_mode_button, ui); + if self.global_state.settings.gameplay.speech_bubble_dark_mode + != speech_bubble_dark_mode + { + events.push(Event::SpeechBubbleDarkMode(speech_bubble_dark_mode)); + } + Text::new( + &self + .localized_strings + .get("hud.settings.speech_bubble_dark_mode"), + ) + .right_from(state.ids.speech_bubble_dark_mode_button, 10.0) + .font_size(self.fonts.cyri.scale(18)) + .font_id(self.fonts.cyri.conrod_id) + .color(TEXT_COLOR) + .set(state.ids.speech_bubble_dark_mode_text, ui); + // Energybars Numbers // Hotbar text Text::new(&self.localized_strings.get("hud.settings.energybar_numbers")) - .down_from( - if self.global_state.settings.gameplay.sct { - state.ids.sct_batch_inc_radio - } else { - state.ids.sct_show_radio - }, - 20.0, - ) + .down_from(state.ids.speech_bubble_dark_mode_button, 20.0) .font_size(self.fonts.cyri.scale(18)) .font_id(self.fonts.cyri.conrod_id) .color(TEXT_COLOR) diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index f8ac11ef23..e785de0d9c 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -594,6 +594,10 @@ impl PlayState for SessionState { global_state.settings.gameplay.sct_damage_batch = sct_damage_batch; global_state.settings.save_to_file_warn(); }, + HudEvent::SpeechBubbleDarkMode(sbdm) => { + global_state.settings.gameplay.speech_bubble_dark_mode = sbdm; + global_state.settings.save_to_file_warn(); + }, HudEvent::ToggleDebug(toggle_debug) => { global_state.settings.gameplay.toggle_debug = toggle_debug; global_state.settings.save_to_file_warn(); diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 8b76af4a4a..5ae6d87294 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -455,6 +455,7 @@ pub struct GameplaySettings { pub sct: bool, pub sct_player_batch: bool, pub sct_damage_batch: bool, + pub speech_bubble_dark_mode: bool, pub mouse_y_inversion: bool, pub smooth_pan_enable: bool, pub crosshair_transp: f32, @@ -480,6 +481,7 @@ impl Default for GameplaySettings { sct: true, sct_player_batch: true, sct_damage_batch: false, + speech_bubble_dark_mode: false, crosshair_transp: 0.6, chat_transp: 0.4, crosshair_type: CrosshairType::Round,