feat(dev): add floor display

This commit is contained in:
2025-01-04 20:10:16 +02:00
parent ead980b7fe
commit f68c68f167
6 changed files with 21 additions and 46 deletions

View File

@@ -1,3 +1,4 @@
pub const MOVEMENT_THRESHOLD: f32 = 0.01;
pub const WALL_OVERLAP_MODIFIER: f32 = 1.25;
pub const FLOOR_Y_OFFSET: u8 = 100;
pub const MOVEMENT_COOLDOWN: f32 = 1.0; // one second cooldown

View File

@@ -40,6 +40,16 @@ pub fn maze_controls_ui(world: &mut World) {
if let Some(mut global_config) = world.get_resource_mut::<GlobalMazeConfig>() {
ui.heading("Maze Configuration");
// Display current floor as non-editable text
ui.horizontal(|ui| {
ui.label("Current floor:");
let mut floor_text = floor_value.to_string();
ui.add_enabled(
false,
TextEdit::singleline(&mut floor_text).desired_width(10.),
);
});
changed |= add_seed_control(ui, &mut maze_config.seed);
changed |= add_drag_value_control(ui, "Radius:", &mut maze_config.radius, 1.0, 1..=100);
changed |=

View File

@@ -0,0 +1 @@