diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-07 23:06:23 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-01-08 16:43:51 +0100 |
commit | af22a4f2cda86a7667578281a51ea1ec08a49af6 (patch) | |
tree | ef59fd78c7d3e2b68594bfbe22b43a6abaf0001e /src/widget.cpp | |
parent | 85a49a0d3605b83b911c57c6e5cc9d8b79365131 (diff) | |
download | openttd-af22a4f2cda86a7667578281a51ea1ec08a49af6.tar.xz |
Add: show in the tooltip of disabled toolbar buttons why they are disabled
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index 2be2f2b85..d1ba44679 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -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; |