summaryrefslogtreecommitdiffhomepage
path: root/editor/imgui-misc.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-08 10:06:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-08 10:06:12 +0200
commitd17ed6b4ba01a73d33e3ff3ca8f0f6fb25259223 (patch)
treeda7b7cfccf239d447f1d2130f901ad885b07b0c7 /editor/imgui-misc.cpp
parent59becaeefcb564356d87aaf19cf67fccea311ca3 (diff)
a
Diffstat (limited to 'editor/imgui-misc.cpp')
-rw-r--r--editor/imgui-misc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/imgui-misc.cpp b/editor/imgui-misc.cpp
index 84522f57..22fe3d2f 100644
--- a/editor/imgui-misc.cpp
+++ b/editor/imgui-misc.cpp
@@ -39,7 +39,11 @@ void app::draw_tile_under_cursor()
const auto coord = *cursor.tile;
const auto chunk = coord.chunk();
const auto local = coord.local();
- snformat(buf, "{}:{} - {}:{}"_cf, chunk.x, chunk.y, local.x, local.y);
+ const auto z = coord.z();
+ if (z == 0)
+ snformat(buf, "{}x{} - {}:{}"_cf, chunk.x, chunk.y, local.x, local.y);
+ else
+ snformat(buf, "{}x{}:{} - {}:{}"_cf, chunk.x, chunk.y, (int)z, local.x, local.y);
const auto size = ImGui::CalcTextSize(buf);
const auto window_size = M->window_size();