From 8b370d187696f49ad85a885ef32f1f230e1a83d7 Mon Sep 17 00:00:00 2001 From: Dregu Date: Wed, 21 Aug 2024 23:09:08 +0300 Subject: [PATCH] Put more reasonable data to tile tooltip --- ui.cpp | 17 +++++++++++------ ui.h | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ui.cpp b/ui.cpp index 164d3e8..be9872e 100644 --- a/ui.cpp +++ b/ui.cpp @@ -2623,13 +2623,18 @@ void UI::HUD() { int wy = 180 * Max::get().player_room()->y + y; int mx = 40 * Max::get().player_room()->x + rx; int my = 22 * Max::get().player_room()->y + ry; - std::string coord = fmt::format( - "Screen: {},{}\n Tile: {},{}\n World: {},{}\n Map: {},{}", x, y, - rx, ry, wx, wy, mx, my); - coord += fmt::format("\n Flags: 0x{:X}", - Max::get().get_room_tile_flags(rx, ry, 0xffff)); - if (fg && bg) + std::string coord = + fmt::format(" Room: {},{}\nScreen: {},{}\n Tile: {},{}\n World: " + "{},{}\n Map: {},{}", + Max::get().player_room()->x, Max::get().player_room()->y, + x, y, rx, ry, wx, wy, mx, my); + if (fg && bg) { + coord += fmt::format("\n Flags: 0x{:X}|0x{:X},0x{:X}", fg->flags, + Max::get().get_room_tile_flags(rx, ry, 0xffff), + bg->flags); + coord += fmt::format("\n Param: {},{}", fg->param, bg->param); coord += fmt::format("\n ID: {},{}", fg->id, bg->id); + } ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID); ImGui::SetTooltip(coord.c_str()); } diff --git a/ui.h b/ui.h index 2cb85e5..287da26 100644 --- a/ui.h +++ b/ui.h @@ -103,6 +103,7 @@ class UI { {"mouse_select_bg", ImGuiMod_Shift | ImGuiKey_MouseMiddle}, {"mouse_destroy", ImGuiKey_MouseX1}, {"mouse_fix", ImGuiMod_Shift | ImGuiKey_MouseX1}, + {"mouse_modifier", ImGuiMod_Shift}, }; std::map keys; // TODO: Save to ini