1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-15 08:22:34 +01:00

Add: show in the tooltip of disabled toolbar buttons why they are disabled

This commit is contained in:
Patric Stout
2021-01-07 23:06:23 +01:00
committed by Patric Stout
parent 85a49a0d36
commit af22a4f2cd
6 changed files with 38 additions and 1 deletions

View File

@@ -895,6 +895,15 @@ void NWidgetCore::SetDataTip(uint32 widget_data, StringID tool_tip)
this->tool_tip = tool_tip;
}
/**
* Set the tool tip of the nested widget.
* @param tool_tip Tool tip string to use.
*/
void NWidgetCore::SetToolTip(StringID tool_tip)
{
this->tool_tip = tool_tip;
}
void NWidgetCore::FillNestedArray(NWidgetBase **array, uint length)
{
if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;