summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-15 15:22:09 +0000
committerrubidium <rubidium@openttd.org>2009-03-15 15:22:09 +0000
commit4f8eeca437a57c160364cdb97182ae1566e6c693 (patch)
tree417f35da53d21b8fbc412b7f3e9f33eaf066dac7
parentf9def73be628b8298eb9164ebdf5d0d77f30b106 (diff)
downloadopenttd-4f8eeca437a57c160364cdb97182ae1566e6c693.tar.xz
(svn r15724) -Codechange: some widget documentation/fixing of enumified constant names (Alberth)
-rw-r--r--src/group_gui.cpp52
-rw-r--r--src/network/network_gui.cpp8
2 files changed, 31 insertions, 29 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index c7d9381ce..0a636c9f2 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -86,32 +86,32 @@ static void ShowGroupActionDropdown(Window *w, GroupID gid)
static const Widget _group_widgets[] = {
-{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
-{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_GREY, 11, 447, 0, 13, 0x0, STR_018C_WINDOW_TITLE_DRAG_THIS},
-{ WWT_STICKYBOX, RESIZE_LR, COLOUR_GREY, 448, 459, 0, 13, 0x0, STR_STICKY_BUTTON},
-{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 200, 280, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP},
-{ WWT_DROPDOWN, RESIZE_NONE, COLOUR_GREY, 281, 447, 14, 25, 0x0, STR_SORT_CRITERIA_TIP},
-{ WWT_PANEL, RESIZE_RIGHT, COLOUR_GREY, 448, 459, 14, 25, 0x0, STR_NULL},
-{ WWT_MATRIX, RESIZE_RB, COLOUR_GREY, 200, 447, 26, 181, 0x701, STR_NULL},
-{ WWT_SCROLLBAR, RESIZE_LRB, COLOUR_GREY, 448, 459, 26, 181, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST},
-{ WWT_PANEL, RESIZE_TB, COLOUR_GREY, 188, 199, 169, 193, 0x0, STR_NULL},
-{ WWT_PUSHTXTBTN, RESIZE_TB, COLOUR_GREY, 200, 305, 182, 193, 0x0, STR_AVAILABLE_ENGINES_TIP},
-{ WWT_DROPDOWN, RESIZE_TB, COLOUR_GREY, 306, 423, 182, 193, STR_MANAGE_LIST, STR_MANAGE_LIST_TIP},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 424, 435, 182, 193, SPR_FLAG_VEH_STOPPED, STR_MASS_STOP_LIST_TIP},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 436, 447, 182, 193, SPR_FLAG_VEH_RUNNING, STR_MASS_START_LIST_TIP},
-{ WWT_PANEL, RESIZE_RTB, COLOUR_GREY, 448, 447, 182, 193, 0x0, STR_NULL},
-{ WWT_RESIZEBOX, RESIZE_LRTB, COLOUR_GREY, 448, 459, 182, 193, 0x0, STR_RESIZE_BUTTON},
-
-{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 14, 25, 0x0, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 26, 38, 0x0, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 39, 51, 0x0, STR_NULL},
-{ WWT_MATRIX, RESIZE_BOTTOM, COLOUR_GREY, 0, 187, 52, 168, 0x701, STR_GROUPS_CLICK_ON_GROUP_FOR_TIP},
-{ WWT_SCROLL2BAR, RESIZE_BOTTOM, COLOUR_GREY, 188, 199, 52, 168, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 0, 23, 169, 193, 0x0, STR_GROUP_CREATE_TIP},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 24, 47, 169, 193, 0x0, STR_GROUP_DELETE_TIP},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 48, 71, 169, 193, 0x0, STR_GROUP_RENAME_TIP},
-{ WWT_PANEL, RESIZE_TB, COLOUR_GREY, 72, 163, 169, 193, 0x0, STR_NULL},
-{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 164, 187, 169, 193, 0x0, STR_GROUP_REPLACE_PROTECTION_TIP},
+{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // GRP_WIDGET_CLOSEBOX
+{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_GREY, 11, 447, 0, 13, 0x0, STR_018C_WINDOW_TITLE_DRAG_THIS}, // GRP_WIDGET_CAPTION
+{ WWT_STICKYBOX, RESIZE_LR, COLOUR_GREY, 448, 459, 0, 13, 0x0, STR_STICKY_BUTTON}, // GRP_WIDGET_STICKY
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_GREY, 200, 280, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP}, // GRP_WIDGET_SORT_BY_ORDER
+{ WWT_DROPDOWN, RESIZE_NONE, COLOUR_GREY, 281, 447, 14, 25, 0x0, STR_SORT_CRITERIA_TIP}, // GRP_WIDGET_SORT_BY_DROPDOWN
+{ WWT_PANEL, RESIZE_RIGHT, COLOUR_GREY, 448, 459, 14, 25, 0x0, STR_NULL}, // GRP_WIDGET_EMPTY_TOP_RIGHT
+{ WWT_MATRIX, RESIZE_RB, COLOUR_GREY, 200, 447, 26, 181, 0x701, STR_NULL}, // GRP_WIDGET_LIST_VEHICLE
+{ WWT_SCROLLBAR, RESIZE_LRB, COLOUR_GREY, 448, 459, 26, 181, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, // GRP_WIDGET_LIST_VEHICLE_SCROLLBAR
+{ WWT_PANEL, RESIZE_TB, COLOUR_GREY, 188, 199, 169, 193, 0x0, STR_NULL}, // GRP_WIDGET_EMPTY2
+{ WWT_PUSHTXTBTN, RESIZE_TB, COLOUR_GREY, 200, 305, 182, 193, 0x0, STR_AVAILABLE_ENGINES_TIP}, // GRP_WIDGET_AVAILABLE_VEHICLES
+{ WWT_DROPDOWN, RESIZE_TB, COLOUR_GREY, 306, 423, 182, 193, STR_MANAGE_LIST, STR_MANAGE_LIST_TIP}, // GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 424, 435, 182, 193, SPR_FLAG_VEH_STOPPED, STR_MASS_STOP_LIST_TIP}, // GRP_WIDGET_STOP_ALL
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 436, 447, 182, 193, SPR_FLAG_VEH_RUNNING, STR_MASS_START_LIST_TIP}, // GRP_WIDGET_START_ALL
+{ WWT_PANEL, RESIZE_RTB, COLOUR_GREY, 448, 447, 182, 193, 0x0, STR_NULL}, // GRP_WIDGET_EMPTY_BOTTOM_RIGHT
+{ WWT_RESIZEBOX, RESIZE_LRTB, COLOUR_GREY, 448, 459, 182, 193, 0x0, STR_RESIZE_BUTTON}, // GRP_WIDGET_RESIZE
+
+{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 14, 25, 0x0, STR_NULL}, // GRP_WIDGET_EMPTY_TOP_LEFT
+{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 26, 38, 0x0, STR_NULL}, // GRP_WIDGET_ALL_VEHICLES
+{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 199, 39, 51, 0x0, STR_NULL}, // GRP_WIDGET_DEFAULT_VEHICLES
+{ WWT_MATRIX, RESIZE_BOTTOM, COLOUR_GREY, 0, 187, 52, 168, 0x701, STR_GROUPS_CLICK_ON_GROUP_FOR_TIP}, // GRP_WIDGET_LIST_GROUP
+{ WWT_SCROLL2BAR, RESIZE_BOTTOM, COLOUR_GREY, 188, 199, 52, 168, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, // GRP_WIDGET_LIST_GROUP_SCROLLBAR
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 0, 23, 169, 193, 0x0, STR_GROUP_CREATE_TIP}, // GRP_WIDGET_CREATE_GROUP
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 24, 47, 169, 193, 0x0, STR_GROUP_DELETE_TIP}, // GRP_WIDGET_DELETE_GROUP
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 48, 71, 169, 193, 0x0, STR_GROUP_RENAME_TIP}, // GRP_WIDGET_RENAME_GROUP
+{ WWT_PANEL, RESIZE_TB, COLOUR_GREY, 72, 163, 169, 193, 0x0, STR_NULL}, // GRP_WIDGET_EMPTY1
+{ WWT_PUSHIMGBTN, RESIZE_TB, COLOUR_GREY, 164, 187, 169, 193, 0x0, STR_GROUP_REPLACE_PROTECTION_TIP}, // GRP_WIDGET_REPLACE_PROTECTION
{ WIDGETS_END},
};
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index e33b2b2a7..02afda79b 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -76,7 +76,7 @@ void UpdateNetworkGameWindow(bool unselect)
enum NetworkGameWindowWidgets {
NGWW_CLOSE, ///< Close 'X' button
NGWW_CAPTION, ///< Caption of the window
- NGWW_RESIZE, ///< Resize button
+ NGWW_MAIN, ///< Main panel
NGWW_CONNECTION, ///< Label in from of connection droplist
NGWW_CONN_BTN, ///< 'Connection' droplist button
@@ -104,6 +104,8 @@ enum NetworkGameWindowWidgets {
NGWW_ADD, ///< 'Add server' button
NGWW_START, ///< 'Start server' button
NGWW_CANCEL, ///< 'Cancel' button
+
+ NGWW_RESIZE, ///< Resize button
};
typedef GUIList<NetworkGameList*> GUIGameServerList;
@@ -772,7 +774,7 @@ static const Widget _network_game_window_widgets[] = {
/* TOP */
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_LIGHT_BLUE, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // NGWW_CLOSE
{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_LIGHT_BLUE, 11, 449, 0, 13, STR_NETWORK_MULTIPLAYER, STR_NULL}, // NGWW_CAPTION
-{ WWT_PANEL, RESIZE_RB, COLOUR_LIGHT_BLUE, 0, 449, 14, 263, 0x0, STR_NULL}, // NGWW_RESIZE
+{ WWT_PANEL, RESIZE_RB, COLOUR_LIGHT_BLUE, 0, 449, 14, 263, 0x0, STR_NULL}, // NGWW_MAIN
{ WWT_TEXT, RESIZE_NONE, COLOUR_LIGHT_BLUE, 9, 85, 23, 35, STR_NETWORK_CONNECTION, STR_NULL}, // NGWW_CONNECTION
{ WWT_DROPDOWNIN, RESIZE_NONE, COLOUR_LIGHT_BLUE, 90, 181, 22, 33, STR_NETWORK_LAN_INTERNET_COMBO, STR_NETWORK_CONNECTION_TIP}, // NGWW_CONN_BTN
@@ -806,7 +808,7 @@ static const Widget _network_game_window_widgets[] = {
{ WWT_PUSHTXTBTN, RESIZE_TB, COLOUR_WHITE, 226, 326, 246, 257, STR_NETWORK_START_SERVER, STR_NETWORK_START_SERVER_TIP}, // NGWW_START
{ WWT_PUSHTXTBTN, RESIZE_TB, COLOUR_WHITE, 334, 434, 246, 257, STR_012E_CANCEL, STR_NULL}, // NGWW_CANCEL
-{ WWT_RESIZEBOX, RESIZE_LRTB, COLOUR_LIGHT_BLUE, 438, 449, 252, 263, 0x0, STR_RESIZE_BUTTON },
+{ WWT_RESIZEBOX, RESIZE_LRTB, COLOUR_LIGHT_BLUE, 438, 449, 252, 263, 0x0, STR_RESIZE_BUTTON }, // NGWW_RESIZE
{ WIDGETS_END},
};