mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
more
This commit is contained in:
parent
7b0aad96d3
commit
272f5310b0
2 changed files with 13 additions and 14 deletions
12
src/debug.rs
12
src/debug.rs
|
|
@ -1,12 +0,0 @@
|
||||||
use crate::game::GameState;
|
|
||||||
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
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
15
src/main.rs
15
src/main.rs
|
|
@ -1,7 +1,6 @@
|
||||||
use egui_sfml::SfEgui;
|
use egui_sfml::SfEgui;
|
||||||
use game::GameState;
|
use game::GameState;
|
||||||
|
|
||||||
mod debug;
|
|
||||||
mod game;
|
mod game;
|
||||||
mod tiles;
|
mod tiles;
|
||||||
|
|
||||||
|
|
@ -21,7 +20,7 @@ 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| {
|
||||||
debug::do_debug_ui(
|
do_debug_ui(
|
||||||
ctx,
|
ctx,
|
||||||
&mut app.game,
|
&mut app.game,
|
||||||
&mut app.scale,
|
&mut app.scale,
|
||||||
|
|
@ -29,3 +28,15 @@ fn main() {
|
||||||
})
|
})
|
||||||
.unwrap();
|
.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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue