summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-07 23:06:23 +0100
committerPatric Stout <github@truebrain.nl>2021-01-08 16:43:51 +0100
commitaf22a4f2cda86a7667578281a51ea1ec08a49af6 (patch)
treeef59fd78c7d3e2b68594bfbe22b43a6abaf0001e /src/widget.cpp
parent85a49a0d3605b83b911c57c6e5cc9d8b79365131 (diff)
downloadopenttd-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.cpp9
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;