From 902b20263ce0b5d5ee9f1e2c54707b012586bbd3 Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 8 Dec 2007 02:55:47 +0000 Subject: [PATCH] (svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick. --- src/window.cpp | 7 +++++++ src/window.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/window.cpp b/src/window.cpp index e5628a3def..e645753015 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); diff --git a/src/window.h b/src/window.h index 137d99804f..f2b910ceaf 100644 --- a/src/window.h +++ b/src/window.h @@ -279,6 +279,8 @@ struct Window { Window *parent; byte custom[WINDOW_CUSTOM_SIZE]; + void HandleButtonClick(byte widget); + void SetWidgetDisabledState(byte widget_index, bool disab_stat); void DisableWidget(byte widget_index); void EnableWidget(byte widget_index);