summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-24 14:15:17 +0000
committerDarkvater <darkvater@openttd.org>2006-10-24 14:15:17 +0000
commitd303ef94b3e4bd19ab21ba49a70dd626e763f275 (patch)
tree51fafb2220dd4dc447ee00655e96ff8b9666708b /window.h
parent605036dbb45fa41f39d7fff7f30faddcc9c48a41 (diff)
downloadopenttd-d303ef94b3e4bd19ab21ba49a70dd626e763f275.tar.xz
(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL is only plain panel,
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2 because that is what it is. Added WWT_PUSHBTN that is either just a pushable button, or a textbutton, which text's drawn dynamically independent of widget.
Diffstat (limited to 'window.h')
-rw-r--r--window.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/window.h b/window.h
index 9d942e282..e3c892aa4 100644
--- a/window.h
+++ b/window.h
@@ -548,34 +548,37 @@ assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(dropdown_d));
enum WindowWidgetBehaviours {
WWB_PUSHBUTTON = 1 << 5,
WWB_NODISBUTTON = 2 << 5,
+
+ WWB_MASK = 0xE0,
};
enum WindowWidgetTypes {
- WWT_EMPTY = 0,
-
- WWT_IMGBTN = 1, /* button with image */
- WWT_PANEL = WWT_IMGBTN,
- WWT_PANEL_2 = 2, /* button with diff image when clicked */
-
- WWT_TEXTBTN = 3, /* button with text */
- WWT_4 = 4, /* button with diff text when clicked */
- WWT_LABEL = 5, /* centered label */
- WWT_6 = 6, /* combo box text area */
- WWT_MATRIX = 7,
- WWT_SCROLLBAR = 8,
- WWT_FRAME = 9, /* frame */
- WWT_CAPTION = 10,
-
- WWT_HSCROLLBAR = 11,
- WWT_STICKYBOX = 12,
- WWT_SCROLL2BAR = 13, /* 2nd vertical scrollbar*/
- WWT_RESIZEBOX = 14,
- WWT_CLOSEBOX = 15,
- WWT_LAST = 16, /* Last Item. use WIDGETS_END to fill up padding!! */
+ WWT_EMPTY = 0,
+
+ WWT_PANEL = 1, /* simple panel */
+ WWT_IMGBTN = 2, /* button with image */
+ WWT_IMGBTN_2 = 3, /* button with diff image when clicked */
+
+ WWT_TEXTBTN = 4, /* button with text */
+ WWT_4 = 5, /* button with diff text when clicked */
+ WWT_LABEL = 6, /* centered label */
+ WWT_6 = 7, /* combo box text area */
+ WWT_MATRIX = 8,
+ WWT_SCROLLBAR = 9,
+ WWT_FRAME = 10, /* frame */
+ WWT_CAPTION = 11,
+
+ WWT_HSCROLLBAR = 12,
+ WWT_STICKYBOX = 13,
+ WWT_SCROLL2BAR = 14, /* 2nd vertical scrollbar*/
+ WWT_RESIZEBOX = 15,
+ WWT_CLOSEBOX = 16,
+ WWT_LAST = 17, /* Last Item. use WIDGETS_END to fill up padding!! */
WWT_MASK = 31,
+ WWT_PUSHBTN = WWT_PANEL | WWB_PUSHBUTTON,
WWT_PUSHTXTBTN = WWT_TEXTBTN | WWB_PUSHBUTTON,
WWT_PUSHIMGBTN = WWT_IMGBTN | WWB_PUSHBUTTON,
WWT_NODISTXTBTN = WWT_TEXTBTN | WWB_NODISBUTTON,