1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

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.
This commit is contained in:
Xkeeper
2019-01-30 16:07:44 -08:00
committed by Aaron van Geffen
parent a1454be336
commit 8a674297eb

View File

@@ -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;
}