1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 21:54:22 +01:00

Codechange: Store EncodedString for tooltip text.

This replaces capturing and storing string parameters.
This commit is contained in:
Peter Nelson
2024-12-07 01:41:31 +00:00
committed by Peter Nelson
parent 1f21e9dc74
commit 2cb9f55183
12 changed files with 67 additions and 77 deletions

View File

@@ -1785,10 +1785,10 @@ public:
if (IsInsideMM(pt.x, player_icon_x, player_icon_x + d2.width)) {
if (index == this->player_self_index) {
GuiShowTooltips(this, STR_NETWORK_CLIENT_LIST_PLAYER_ICON_SELF_TOOLTIP, close_cond);
GuiShowTooltips(this, GetEncodedString(STR_NETWORK_CLIENT_LIST_PLAYER_ICON_SELF_TOOLTIP), close_cond);
return true;
} else if (index == this->player_host_index) {
GuiShowTooltips(this, STR_NETWORK_CLIENT_LIST_PLAYER_ICON_HOST_TOOLTIP, close_cond);
GuiShowTooltips(this, GetEncodedString(STR_NETWORK_CLIENT_LIST_PLAYER_ICON_HOST_TOOLTIP), close_cond);
return true;
}
}
@@ -1796,7 +1796,7 @@ public:
ButtonCommon *button = this->GetButtonAtPoint(pt);
if (button == nullptr) return false;
GuiShowTooltips(this, button->tooltip, close_cond);
GuiShowTooltips(this, GetEncodedString(button->tooltip), close_cond);
return true;
};
}