mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
more
This commit is contained in:
parent
272f5310b0
commit
0cb12f28b5
1 changed files with 4 additions and 10 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -20,23 +20,17 @@ fn main() {
|
|||
let mut app = App::new().unwrap();
|
||||
app.sf_egui
|
||||
.do_frame(|ctx| {
|
||||
do_debug_ui(
|
||||
ctx,
|
||||
&mut app.game,
|
||||
&mut app.scale,
|
||||
);
|
||||
do_debug_ui(ctx, &mut app.game, &mut app.scale);
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
use egui_inspect::inspect;
|
||||
|
||||
pub(crate) fn do_debug_ui(ctx: &egui::Context, mut game: &mut GameState, mut scale: &mut u8) {
|
||||
egui::Window::new("Debug (F12)").show(ctx, |ui| {
|
||||
egui::ScrollArea::both().show(ui, |ui| {
|
||||
inspect! {
|
||||
ui, scale, game
|
||||
}
|
||||
let mut id_source = 0;
|
||||
::egui_inspect::UiExt::property(ui, "scale", &mut scale, &mut id_source);
|
||||
::egui_inspect::UiExt::property(ui, "game", &mut game, &mut id_source);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue