Shift egui debug window right

This commit is contained in:
juliancoffee 2021-08-06 22:53:51 +03:00
parent 16c72b8667
commit 3411ccc7ee
2 changed files with 5 additions and 2 deletions

View File

@ -14,7 +14,7 @@ use core::mem;
use egui::{ use egui::{
plot::{Plot, Value}, plot::{Plot, Value},
widgets::plot::Curve, widgets::plot::Curve,
CollapsingHeader, Color32, Grid, Label, ScrollArea, Slider, Ui, Window, CollapsingHeader, Color32, Grid, Label, Pos2, ScrollArea, Slider, Ui, Window,
}; };
fn two_col_row(ui: &mut Ui, label: impl Into<Label>, content: impl Into<Label>) { fn two_col_row(ui: &mut Ui, label: impl Into<Label>, content: impl Into<Label>) {
@ -202,7 +202,9 @@ pub fn maintain_egui_inner(
} }
}; };
let start_pos = Pos2 { x: 300.0, y: 0.0 };
egui::Window::new("Debug Control") egui::Window::new("Debug Control")
.default_pos(start_pos)
.default_width(200.0) .default_width(200.0)
.default_height(200.0) .default_height(200.0)
.show(&platform.context(), |ui| { .show(&platform.context(), |ui| {

View File

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