Add option to toggle egui debug

This commit is contained in:
juliancoffee 2021-08-06 21:57:34 +03:00
parent e99a885bfe
commit abf5a7e136
2 changed files with 5 additions and 1 deletions

View File

@ -196,7 +196,9 @@ fn handle_main_events_cleared(
last.render(&mut drawer, &global_state.settings);
#[cfg(feature = "egui-ui")]
if last.egui_enabled() && global_state.settings.interface.toggle_debug {
if last.egui_enabled()
&& global_state.settings.interface.toggle_debug
&& global_state.settings.interface.toggle_egui_debug {
drawer.draw_egui(&mut global_state.egui_state.platform, scale_factor);
}
};

View File

@ -10,6 +10,7 @@ use vek::*;
#[serde(default)]
pub struct InterfaceSettings {
pub toggle_debug: bool,
pub toggle_egui_debug: bool,
pub toggle_hitboxes: bool,
pub toggle_chat: bool,
pub sct: bool,
@ -46,6 +47,7 @@ impl Default for InterfaceSettings {
fn default() -> Self {
Self {
toggle_debug: false,
toggle_egui_debug: false,
toggle_hitboxes: false,
toggle_chat: true,
sct: true,