diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-22 13:54:00 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-22 13:54:00 -0700 |
| commit | 6350e4ffca8ce1e46465284ef3d7559e0f40229b (patch) | |
| tree | 597bd17cc5c86d7271fea5abba4495fb58b4d7c2 /src/renderer | |
| parent | 21f6ee0be48f83db3a0052269cfc47ac73dc64f9 (diff) | |
fixes and refactors
Diffstat (limited to 'src/renderer')
| -rw-r--r-- | src/renderer/ui.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/renderer/ui.rs b/src/renderer/ui.rs index 27b3be4..c4f7585 100644 --- a/src/renderer/ui.rs +++ b/src/renderer/ui.rs @@ -107,9 +107,12 @@ pub fn draw_egui<'a>( .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,))); + if let Some(p) = input.last_mouse_chunk_pos { + ui.label(format!("Mouse (chunk): x,y=({x}, {y})", x = p.0, y = p.1,)); + if let Some(&chunk) = world.chunk_position_to_chunk_idx.get(&p) { + ui.label(format!("Sleeping={}", world.chunks[chunk].sleeping)); + } + } input .last_mouse_local_pos |
