Changeset - r11454:3e9570b5979f
[Not reviewed]
master
0 2 0
alberth - 16 years ago 2009-03-22 18:46:56
alberth@openttd.org
(svn r15817) -Codechange: Make room for additional widget types (Rubidium)
2 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/widget_type.h
Show inline comments
 
@@ -92,16 +92,15 @@ enum WidgetType {
 
	WWT_CLOSEBOX,   ///< Close box (at top-left of a window)
 
	WWT_DROPDOWN,   ///< Raised drop down list (regular)
 
	WWT_DROPDOWNIN, ///< Inset drop down list (used on game options only)
 
	WWT_EDITBOX,    ///< a textbox for typing
 
	WWT_LAST,       ///< Last Item. use WIDGETS_END to fill up padding!!
 

	
 
	WWT_MASK = 0x1F,
 
	WWT_MASK = 0x7F,
 

	
 
	WWB_PUSHBUTTON  = 1 << 5,
 
	WWB_MASK        = 0xE0,
 
	WWB_PUSHBUTTON  = 1 << 7,
 

	
 
	WWT_PUSHBTN     = WWT_PANEL   | WWB_PUSHBUTTON,
 
	WWT_PUSHTXTBTN  = WWT_TEXTBTN | WWB_PUSHBUTTON,
 
	WWT_PUSHIMGBTN  = WWT_IMGBTN  | WWB_PUSHBUTTON,
 
};
 

	
src/window.cpp
Show inline comments
 
@@ -281,13 +281,13 @@ static void DispatchLeftClickEvent(Windo
 
				if (w->focused_widget) w->InvalidateWidget(w->focused_widget - w->widget);
 
				focused_widget_changed = true;
 
				w->focused_widget = wi;
 
			}
 
		}
 

	
 
		if (wi->type & WWB_MASK) {
 
		if (wi->type & WWB_PUSHBUTTON) {
 
			/* special widget handling for buttons*/
 
			switch (wi->type) {
 
				default: NOT_REACHED();
 
				case WWT_PANEL   | WWB_PUSHBUTTON: // WWT_PUSHBTN
 
				case WWT_IMGBTN  | WWB_PUSHBUTTON: // WWT_PUSHIMGBTN
 
				case WWT_TEXTBTN | WWB_PUSHBUTTON: // WWT_PUSHTXTBTN
0 comments (0 inline, 0 general)