From a3106e4c4c2194e2b95f9b3cdfe22140ddde6640 Mon Sep 17 00:00:00 2001 From: Xkeeper Date: Thu, 31 Jan 2019 14:50:53 -0800 Subject: [PATCH] Add sign tooltips to 3d signs For some reason, all signs report "Sign" as their text before actually being modified. This also happens with the tile inspector, so for now I'm not terribly worried about it --- .../interface/ViewportInteraction.cpp | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 8e135ceb5f..195872f23b 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -317,8 +317,11 @@ int32_t viewport_interaction_get_item_right(int32_t x, int32_t y, viewport_inter sceneryEntry = tileElement->AsWall()->GetEntry(); if (sceneryEntry->wall.scrolling_mode != SCROLLING_MODE_NONE) { - set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); - set_map_tooltip_format_arg(2, rct_string_id, sceneryEntry->name); + banner = &gBanners[tileElement->AsWall()->GetBannerIndex()]; + set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID); + set_map_tooltip_format_arg(2, rct_string_id, banner->string_idx); + set_map_tooltip_format_arg(4, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); + set_map_tooltip_format_arg(6, rct_string_id, sceneryEntry->name); return info->type; } break; @@ -327,8 +330,12 @@ int32_t viewport_interaction_get_item_right(int32_t x, int32_t y, viewport_inter sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); if (sceneryEntry->large_scenery.scrolling_mode != SCROLLING_MODE_NONE) { - set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); - set_map_tooltip_format_arg(2, rct_string_id, sceneryEntry->name); + + banner = &gBanners[tileElement->AsLargeScenery()->GetBannerIndex()]; + set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID); + set_map_tooltip_format_arg(2, rct_string_id, banner->string_idx); + set_map_tooltip_format_arg(4, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); + set_map_tooltip_format_arg(6, rct_string_id, sceneryEntry->name); return info->type; } break; @@ -337,15 +344,15 @@ int32_t viewport_interaction_get_item_right(int32_t x, int32_t y, viewport_inter banner = &gBanners[tileElement->AsBanner()->GetIndex()]; sceneryEntry = get_banner_entry(banner->type); - set_map_tooltip_format_arg( 0, rct_string_id, STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID); + set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID); if (banner->flags & BANNER_FLAG_NO_ENTRY) - set_map_tooltip_format_arg( 2, rct_string_id, STR_NO_ENTRY); + set_map_tooltip_format_arg(2, rct_string_id, STR_NO_ENTRY); else - set_map_tooltip_format_arg( 2, rct_string_id, banner->string_idx); + set_map_tooltip_format_arg(2, rct_string_id, banner->string_idx); - set_map_tooltip_format_arg( 4, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); - set_map_tooltip_format_arg( 6, rct_string_id, sceneryEntry->name); + set_map_tooltip_format_arg(4, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); + set_map_tooltip_format_arg(6, rct_string_id, sceneryEntry->name); return info->type; }