mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
more
This commit is contained in:
parent
ba93afdf0a
commit
9f3d739e34
4 changed files with 6 additions and 23 deletions
|
|
@ -1,2 +0,0 @@
|
||||||
use std::ops::{BitAndAssign, BitOrAssign};
|
|
||||||
use num_traits::PrimInt;
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
use clap::Parser;
|
|
||||||
use crate::{command::Cmd, math::WorldPos};
|
|
||||||
18
src/debug.rs
18
src/debug.rs
|
|
@ -1,5 +1,6 @@
|
||||||
use crate::{command::CmdVec, game::GameState};
|
use crate::game::GameState;
|
||||||
use egui_inspect::{derive::Inspect, inspect};
|
use egui_inspect::{derive::Inspect, inspect};
|
||||||
|
|
||||||
#[derive(Default, Debug, Inspect)]
|
#[derive(Default, Debug, Inspect)]
|
||||||
pub(crate) struct DebugState {}
|
pub(crate) struct DebugState {}
|
||||||
fn debug_panel_ui(
|
fn debug_panel_ui(
|
||||||
|
|
@ -9,23 +10,11 @@ fn debug_panel_ui(
|
||||||
mut scale: &mut u8,
|
mut scale: &mut u8,
|
||||||
) {
|
) {
|
||||||
egui::Window::new("Debug (F12)").show(ctx, |ui| {
|
egui::Window::new("Debug (F12)").show(ctx, |ui| {
|
||||||
egui::ScrollArea::both()
|
egui::ScrollArea::both().show(ui, |ui| {
|
||||||
.id_source("insp_scroll")
|
|
||||||
.max_height(240.)
|
|
||||||
.max_width(340.0)
|
|
||||||
.show(ui, |ui| {
|
|
||||||
inspect! {
|
inspect! {
|
||||||
ui, scale, game, debug
|
ui, scale, game, debug
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
|
||||||
gamedebug_core::for_each_imm(|info| match info {
|
|
||||||
gamedebug_core::Info::Msg(msg) => {
|
|
||||||
ui.label(msg);
|
|
||||||
}
|
|
||||||
gamedebug_core::Info::Rect(_, _, _, _, _) => todo!(),
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pub(crate) fn do_debug_ui(
|
pub(crate) fn do_debug_ui(
|
||||||
|
|
@ -33,7 +22,6 @@ pub(crate) fn do_debug_ui(
|
||||||
debug: &mut DebugState,
|
debug: &mut DebugState,
|
||||||
game: &mut GameState,
|
game: &mut GameState,
|
||||||
scale: &mut u8,
|
scale: &mut u8,
|
||||||
cmd: &mut CmdVec,
|
|
||||||
) {
|
) {
|
||||||
debug_panel_ui(debug, game, ctx, scale);
|
debug_panel_ui(debug, game, ctx, scale);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ fn main() {
|
||||||
&mut app.debug,
|
&mut app.debug,
|
||||||
&mut app.game,
|
&mut app.game,
|
||||||
&mut app.scale,
|
&mut app.scale,
|
||||||
&mut app.cmdvec,
|
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue