diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 10:06:12 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 10:06:12 +0200 |
commit | d17ed6b4ba01a73d33e3ff3ca8f0f6fb25259223 (patch) | |
tree | da7b7cfccf239d447f1d2130f901ad885b07b0c7 /editor/imgui-misc.cpp | |
parent | 59becaeefcb564356d87aaf19cf67fccea311ca3 (diff) |
a
Diffstat (limited to 'editor/imgui-misc.cpp')
-rw-r--r-- | editor/imgui-misc.cpp | 6 |
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(); |