mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-17 04:45: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();
|
let mut app = App::new().unwrap();
|
||||||
app.sf_egui
|
app.sf_egui
|
||||||
.do_frame(|ctx| {
|
.do_frame(|ctx| {
|
||||||
do_debug_ui(
|
do_debug_ui(ctx, &mut app.game, &mut app.scale);
|
||||||
ctx,
|
|
||||||
&mut app.game,
|
|
||||||
&mut app.scale,
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
use egui_inspect::inspect;
|
|
||||||
|
|
||||||
pub(crate) fn do_debug_ui(ctx: &egui::Context, mut game: &mut GameState, mut scale: &mut u8) {
|
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::Window::new("Debug (F12)").show(ctx, |ui| {
|
||||||
egui::ScrollArea::both().show(ui, |ui| {
|
egui::ScrollArea::both().show(ui, |ui| {
|
||||||
inspect! {
|
let mut id_source = 0;
|
||||||
ui, scale, game
|
::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