summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-04-11 18:38:10 +0000
committeralberth <alberth@openttd.org>2009-04-11 18:38:10 +0000
commit23f02775267684d490556fdab7c0dc983fedfebe (patch)
treee61d95afe8935f8cdb9c637dfa49cbd085cf8e58
parent8a90633ba64e17f131fcd474bea10263012f3c29 (diff)
downloadopenttd-23f02775267684d490556fdab7c0dc983fedfebe.tar.xz
(svn r16032) -Codechange: Completing widget numbers of query windows.
-rw-r--r--src/misc_gui.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 1db5226d6..4d9074158 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1093,7 +1093,10 @@ void QueryStringBaseWindow::OnOpenOSKWindow(int wid)
}
enum QueryStringWidgets {
- QUERY_STR_WIDGET_TEXT = 3,
+ QUERY_STR_WIDGET_CLOSEBOX,
+ QUERY_STR_WIDGET_CAPTION,
+ QUERY_STR_WIDGET_BACKGROUND,
+ QUERY_STR_WIDGET_TEXT,
QUERY_STR_WIDGET_DEFAULT,
QUERY_STR_WIDGET_CANCEL,
QUERY_STR_WIDGET_OK
@@ -1185,13 +1188,13 @@ struct QueryStringWindow : public QueryStringBaseWindow
};
static const Widget _query_string_widgets[] = {
-{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
-{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 259, 0, 13, STR_012D, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 259, 14, 29, 0x0, STR_NULL},
-{ WWT_EDITBOX, RESIZE_NONE, COLOUR_GREY, 2, 257, 16, 27, 0x0, STR_NULL}, // QUERY_STR_WIDGET_TEXT
-{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 0, 86, 30, 41, STR_DEFAULT, STR_NULL}, // QUERY_STR_WIDGET_DEFAULT
-{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 87, 172, 30, 41, STR_012E_CANCEL, STR_NULL}, // QUERY_STR_WIDGET_CANCEL
-{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 173, 259, 30, 41, STR_012F_OK, STR_NULL}, // QUERY_STR_WIDGET_OK
+{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // QUERY_STR_WIDGET_CLOSEBOX
+{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 259, 0, 13, STR_012D, STR_NULL}, // QUERY_STR_WIDGET_CAPTION
+{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 259, 14, 29, 0x0, STR_NULL}, // QUERY_STR_WIDGET_BACKGROUND
+{ WWT_EDITBOX, RESIZE_NONE, COLOUR_GREY, 2, 257, 16, 27, 0x0, STR_NULL}, // QUERY_STR_WIDGET_TEXT
+{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 0, 86, 30, 41, STR_DEFAULT, STR_NULL}, // QUERY_STR_WIDGET_DEFAULT
+{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 87, 172, 30, 41, STR_012E_CANCEL, STR_NULL}, // QUERY_STR_WIDGET_CANCEL
+{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 173, 259, 30, 41, STR_012F_OK, STR_NULL}, // QUERY_STR_WIDGET_OK
{ WIDGETS_END},
};
@@ -1240,8 +1243,10 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, uint maxwidth
enum QueryWidgets {
- QUERY_WIDGET_CAPTION = 1,
- QUERY_WIDGET_NO = 3,
+ QUERY_WIDGET_CLOSEBOX,
+ QUERY_WIDGET_CAPTION,
+ QUERY_WIDGET_BACKGROUND,
+ QUERY_WIDGET_NO,
QUERY_WIDGET_YES
};
@@ -1327,11 +1332,11 @@ struct QueryWindow : public Window {
static const Widget _query_widgets[] = {
-{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_RED, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
-{ WWT_CAPTION, RESIZE_NONE, COLOUR_RED, 11, 209, 0, 13, STR_NULL, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, COLOUR_RED, 0, 209, 14, 81, 0x0, /*OVERRIDE*/STR_NULL},
-{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 20, 90, 62, 73, STR_00C9_NO, STR_NULL},
-{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 120, 190, 62, 73, STR_00C8_YES, STR_NULL},
+{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_RED, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // QUERY_WIDGET_CLOSEBOX
+{ WWT_CAPTION, RESIZE_NONE, COLOUR_RED, 11, 209, 0, 13, STR_NULL, STR_NULL}, // QUERY_WIDGET_CAPTION
+{ WWT_PANEL, RESIZE_NONE, COLOUR_RED, 0, 209, 14, 81, 0x0, /*OVERRIDE*/STR_NULL}, // QUERY_WIDGET_BACKGROUND
+{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 20, 90, 62, 73, STR_00C9_NO, STR_NULL}, // QUERY_WIDGET_NO
+{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 120, 190, 62, 73, STR_00C8_YES, STR_NULL}, // QUERY_WIDGET_YES
{ WIDGETS_END },
};