summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2026-08-18 00:21:44 -0700
committerKai Stevenson <kai@kaistevenson.com>2026-08-18 00:21:44 -0700
commit4d4f28f4d0e93541e92277f44451aacdc23b8227 (patch)
tree612b38036a4f79f1d50637a061cf2f636f5d1ded /src/renderer
parent4ad69d966f0640daae34c677eead5b689cbfac2e (diff)
MVP of marching squares
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/ui.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/renderer/ui.rs b/src/renderer/ui.rs
index a1ac31f..56bf278 100644
--- a/src/renderer/ui.rs
+++ b/src/renderer/ui.rs
@@ -100,18 +100,20 @@ pub fn draw_egui<'a>(
ui.add(egui::Slider::new(&mut camera.zoom, 0.0..=10.0).text("Zoom"));
ui.heading("Input");
- input.last_mouse_pos_on_screen.map(|p| {
- ui.label(format!(
- "Mouse: x,y=({x}, {y}), lmb_pressed={lmb}",
- x = p.0,
- y = p.1,
- lmb = input.is_lmb_pressed
- ))
- });
+ input
+ .last_mouse_world_pos
+ .map(|p| ui.label(format!("Mouse (world): x,y=({x}, {y})", x = p.0, y = p.1,)));
+
+ input
+ .last_mouse_chunk_pos
+ .map(|p| ui.label(format!("Mouse (chunk): x,y=({x}, {y})", x = p.0, y = p.1,)));
+
+ input
+ .last_mouse_local_pos
+ .map(|p| ui.label(format!("Mouse (local): x,y=({x}, {y})", x = p.0, y = p.1,)));
if let Some((x, y)) = input.last_mouse_world_pos {
ui.heading("Entity");
- ui.label(format!("x,y=({x}, {y})"));
if let Some(cell) = world.get_cell_from_game_position(x.round() as i32, y.round() as i32) {
let material = cell.material.def();
let cell_label = ui.label(