Skip to content

Commit

Permalink
Put more reasonable data to tile tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Aug 21, 2024
1 parent cf49875 commit 8b370d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
1 change: 1 addition & 0 deletions ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, ImGuiKeyChord> keys;
// TODO: Save to ini
Expand Down

0 comments on commit 8b370d1

Please sign in to comment.