summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-12-08 02:55:47 +0000
committerbelugas <belugas@openttd.org>2007-12-08 02:55:47 +0000
commit902b20263ce0b5d5ee9f1e2c54707b012586bbd3 (patch)
tree157f21bac564334a96cdb18299c8489c9e96c4d7 /src/window.cpp
parente3f4d0e72a39ca20f450486e2ae0a1cfaa1aa959 (diff)
downloadopenttd-902b20263ce0b5d5ee9f1e2c54707b012586bbd3.tar.xz
(svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index e5628a3de..e64575301 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -90,6 +90,13 @@ void Window::InvalidateWidget(byte widget_index) const
SetDirtyBlocks(this->left + wi->left, this->top + wi->top, this->left + wi->right + 1, this->top + wi->bottom + 1);
}
+void Window::HandleButtonClick(byte widget)
+{
+ this->LowerWidget(widget);
+ this->flags4 |= 5 << WF_TIMEOUT_SHL;
+ this->InvalidateWidget(widget);
+}
+
void HandleButtonClick(Window *w, byte widget)
{
w->LowerWidget(widget);