(svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick.
authorbelugas
Sat, 08 Dec 2007 02:55:47 +0000
changeset 8531 e87a51f162e2
parent 8530 90a35d776726
child 8532 3099f32f9bfd
(svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick.
src/window.cpp
src/window.h
--- a/src/window.cpp	Sat Dec 08 01:36:40 2007 +0000
+++ b/src/window.cpp	Sat Dec 08 02:55:47 2007 +0000
@@ -90,6 +90,13 @@
 	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);
--- a/src/window.h	Sat Dec 08 01:36:40 2007 +0000
+++ b/src/window.h	Sat Dec 08 02:55:47 2007 +0000
@@ -279,6 +279,8 @@
 	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);