summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
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(