From 8a674297eb303c61991f5d63e64485a380c0310f Mon Sep 17 00:00:00 2001 From: Xkeeper Date: Wed, 30 Jan 2019 16:07:44 -0800 Subject: [PATCH] Add sign tooltips that display the sign message re: OpenRCT2/OpenRCT2#8593 Modifies the code for tooltip displays to show the string assigned to a banner. It also uses the color assigned to the sign (by sheer coincidence). As of right now I do not think that it works for non-banner signs (such as the 3D landscapes or scrolling signs etc), but it works for the typical case of banners, as well as "No entry" banners. --- src/openrct2-ui/interface/ViewportInteraction.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index fd92214c8a..aa210593b9 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -337,8 +337,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_STRINGID_CLICK_TO_MODIFY); - set_map_tooltip_format_arg(2, rct_string_id, sceneryEntry->name); + 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_TOOLTIP); + } else { + 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; }