Changeset - r8035:20c4b4396644
[Not reviewed]
master
0 2 0
belugas - 17 years ago 2007-12-08 02:55:47
belugas@openttd.org
(svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick.
2 files changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -90,6 +90,13 @@ void Window::InvalidateWidget(byte widge
 
	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);
src/window.h
Show inline comments
 
@@ -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);
0 comments (0 inline, 0 general)