From 0aa2781c25475d0ca68c295c96885eafba428eef Mon Sep 17 00:00:00 2001 From: crumblingstatue Date: Mon, 3 Apr 2023 12:08:57 +0200 Subject: [PATCH] Display horizontal offset from center --- src/app.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 940d280..7b05d0e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -57,7 +57,6 @@ impl App { fn do_update(&mut self) { let tp = self.game.camera_offset.tile_pos(); - self.game.camera_offset.y += 800; imm_dbg!(tp); imm_dbg!(tp.to_chunk_and_local()); } @@ -77,6 +76,10 @@ impl App { "Depth: {}", LengthDisp(tile_off.y as i64 - wp_to_tp(WorldPos::SURFACE) as i64) )); + ui.label(format!( + "Offset from center: {}", + LengthDisp(tile_off.x as i64 - wp_to_tp(WorldPos::CENTER) as i64) + )); ui.separator(); egui::ScrollArea::vertical().show(ui, |ui| { gamedebug_core::for_each_imm(|info| match info {