summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-17 23:23:10 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-17 23:23:10 +0000
commit5f57b49c7e9e957ddad5dbbc10c7fce1f35fcc0b (patch)
tree45b721583ce9ac43315ec9f752ea5750cd5d14b8
parent40e49f25d6cbd979394ce370ef75bd5b57cdafcc (diff)
downloadopenttd-5f57b49c7e9e957ddad5dbbc10c7fce1f35fcc0b.tar.xz
(svn r3931) - [ 1451726 ] Use sprite names in main_gui.c instead of numbers (matthewwalton)
-rw-r--r--main_gui.c134
1 files changed, 67 insertions, 67 deletions
diff --git a/main_gui.c b/main_gui.c
index 5b7c594c6..6c6614e02 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1944,39 +1944,39 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
}
static const Widget _toolb_normal_widgets[] = {
-{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, 0x2D6, STR_0171_PAUSE_GAME},
+{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, SPR_IMG_PAUSE, STR_0171_PAUSE_GAME},
{ WWT_PANEL, RESIZE_NONE, 14, 22, 43, 0, 21, SPR_IMG_FASTFORWARD, STR_FAST_FORWARD},
-{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, 0x2EF, STR_0187_OPTIONS},
-{ WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, 0x2D4, STR_0172_SAVE_GAME_ABANDON_GAME},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 96, 117, 0, 21, 0x2C4, STR_0174_DISPLAY_MAP},
-{ WWT_PANEL, RESIZE_NONE, 14, 118, 139, 0, 21, 0xFED, STR_0176_DISPLAY_TOWN_DIRECTORY},
-{ WWT_PANEL, RESIZE_NONE, 14, 140, 161, 0, 21, 0x2A7, STR_02DC_DISPLAY_SUBSIDIES},
-{ WWT_PANEL, RESIZE_NONE, 14, 162, 183, 0, 21, 0x513, STR_0173_DISPLAY_LIST_OF_COMPANY},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 191, 212, 0, 21, 0x2E1, STR_0177_DISPLAY_COMPANY_FINANCES},
-{ WWT_PANEL, RESIZE_NONE, 14, 213, 235, 0, 21, 0x2E7, STR_0178_DISPLAY_COMPANY_GENERAL},
-{ WWT_PANEL, RESIZE_NONE, 14, 236, 257, 0, 21, 0x2E9, STR_0179_DISPLAY_GRAPHS},
-{ WWT_PANEL, RESIZE_NONE, 14, 258, 279, 0, 21, 0x2AC, STR_017A_DISPLAY_COMPANY_LEAGUE},
-{ WWT_PANEL, RESIZE_NONE, 14, 280, 301, 0, 21, 0x2E5, STR_0312_FUND_CONSTRUCTION_OF_NEW},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 310, 331, 0, 21, 0x2DB, STR_017B_DISPLAY_LIST_OF_COMPANY},
-{ WWT_PANEL, RESIZE_NONE, 14, 332, 353, 0, 21, 0x2DC, STR_017C_DISPLAY_LIST_OF_COMPANY},
-{ WWT_PANEL, RESIZE_NONE, 14, 354, 375, 0, 21, 0x2DD, STR_017D_DISPLAY_LIST_OF_COMPANY},
-{ WWT_PANEL, RESIZE_NONE, 14, 376, 397, 0, 21, 0x2DE, STR_017E_DISPLAY_LIST_OF_COMPANY},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 406, 427, 0, 21, 0x2DF, STR_017F_ZOOM_THE_VIEW_IN},
-{ WWT_PANEL, RESIZE_NONE, 14, 428, 449, 0, 21, 0x2E0, STR_0180_ZOOM_THE_VIEW_OUT},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 457, 478, 0, 21, 0x2D7, STR_0181_BUILD_RAILROAD_TRACK},
-{ WWT_PANEL, RESIZE_NONE, 14, 479, 500, 0, 21, 0x2D8, STR_0182_BUILD_ROADS},
-{ WWT_PANEL, RESIZE_NONE, 14, 501, 522, 0, 21, 0x2D9, STR_0183_BUILD_SHIP_DOCKS},
-{ WWT_PANEL, RESIZE_NONE, 14, 523, 544, 0, 21, 0x2DA, STR_0184_BUILD_AIRPORTS},
-{ WWT_PANEL, RESIZE_NONE, 14, 545, 566, 0, 21, 0xFF3, STR_LANDSCAPING_TOOLBAR_TIP}, // tree icon is 0x2E6
-
-{ WWT_PANEL, RESIZE_NONE, 14, 574, 595, 0, 21, 0x2C9, STR_01D4_SHOW_SOUND_MUSIC_WINDOW},
-{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, 0x2A8, STR_0203_SHOW_LAST_MESSAGE_NEWS},
-{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, 0x2D3, STR_0186_LAND_BLOCK_INFORMATION},
+{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, SPR_IMG_SETTINGS, STR_0187_OPTIONS},
+{ WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, SPR_IMG_SAVE, STR_0172_SAVE_GAME_ABANDON_GAME},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 96, 117, 0, 21, SPR_IMG_SMALLMAP, STR_0174_DISPLAY_MAP},
+{ WWT_PANEL, RESIZE_NONE, 14, 118, 139, 0, 21, SPR_IMG_TOWN, STR_0176_DISPLAY_TOWN_DIRECTORY},
+{ WWT_PANEL, RESIZE_NONE, 14, 140, 161, 0, 21, SPR_IMG_SUBSIDIES, STR_02DC_DISPLAY_SUBSIDIES},
+{ WWT_PANEL, RESIZE_NONE, 14, 162, 183, 0, 21, SPR_IMG_COMPANY_LIST, STR_0173_DISPLAY_LIST_OF_COMPANY},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 191, 212, 0, 21, SPR_IMG_COMPANY_FINANCE, STR_0177_DISPLAY_COMPANY_FINANCES},
+{ WWT_PANEL, RESIZE_NONE, 14, 213, 235, 0, 21, SPR_IMG_COMPANY_GENERAL, STR_0178_DISPLAY_COMPANY_GENERAL},
+{ WWT_PANEL, RESIZE_NONE, 14, 236, 257, 0, 21, SPR_IMG_GRAPHS, STR_0179_DISPLAY_GRAPHS},
+{ WWT_PANEL, RESIZE_NONE, 14, 258, 279, 0, 21, SPR_IMG_COMPANY_LEAGUE, STR_017A_DISPLAY_COMPANY_LEAGUE},
+{ WWT_PANEL, RESIZE_NONE, 14, 280, 301, 0, 21, SPR_IMG_INDUSTRY, STR_0312_FUND_CONSTRUCTION_OF_NEW},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 310, 331, 0, 21, SPR_IMG_TRAINLIST, STR_017B_DISPLAY_LIST_OF_COMPANY},
+{ WWT_PANEL, RESIZE_NONE, 14, 332, 353, 0, 21, SPR_IMG_TRUCKLIST, STR_017C_DISPLAY_LIST_OF_COMPANY},
+{ WWT_PANEL, RESIZE_NONE, 14, 354, 375, 0, 21, SPR_IMG_SHIPLIST, STR_017D_DISPLAY_LIST_OF_COMPANY},
+{ WWT_PANEL, RESIZE_NONE, 14, 376, 397, 0, 21, SPR_IMG_AIRPLANESLIST, STR_017E_DISPLAY_LIST_OF_COMPANY},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 406, 427, 0, 21, SPR_IMG_ZOOMIN, STR_017F_ZOOM_THE_VIEW_IN},
+{ WWT_PANEL, RESIZE_NONE, 14, 428, 449, 0, 21, SPR_IMG_ZOOMOUT, STR_0180_ZOOM_THE_VIEW_OUT},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 457, 478, 0, 21, SPR_IMG_BUILDRAIL, STR_0181_BUILD_RAILROAD_TRACK},
+{ WWT_PANEL, RESIZE_NONE, 14, 479, 500, 0, 21, SPR_IMG_BUILDROAD, STR_0182_BUILD_ROADS},
+{ WWT_PANEL, RESIZE_NONE, 14, 501, 522, 0, 21, SPR_IMG_BUILDWATER, STR_0183_BUILD_SHIP_DOCKS},
+{ WWT_PANEL, RESIZE_NONE, 14, 523, 544, 0, 21, SPR_IMG_BUILDAIR, STR_0184_BUILD_AIRPORTS},
+{ WWT_PANEL, RESIZE_NONE, 14, 545, 566, 0, 21, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, // tree icon is 0x2E6
+
+{ WWT_PANEL, RESIZE_NONE, 14, 574, 595, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW},
+{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MESSAGES, STR_0203_SHOW_LAST_MESSAGE_NEWS},
+{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION},
{ WIDGETS_END},
};
@@ -1990,40 +1990,40 @@ static const WindowDesc _toolb_normal_desc = {
static const Widget _toolb_scen_widgets[] = {
-{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, 0x2D6, STR_0171_PAUSE_GAME},
-{ WWT_PANEL, RESIZE_NONE, 14, 22, 43, 0, 21, SPR_IMG_FASTFORWARD, STR_FAST_FORWARD},
-{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, 0x2EF, STR_0187_OPTIONS},
-{ WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, 0x2D4, STR_0297_SAVE_SCENARIO_LOAD_SCENARIO},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 96, 225, 0, 21, 0x0, STR_NULL},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 233, 362, 0, 21, 0x0, STR_NULL},
-{ WWT_IMGBTN, RESIZE_NONE, 14, 236, 247, 5, 16, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE},
-{ WWT_IMGBTN, RESIZE_NONE, 14, 347, 358, 5, 16, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 371, 392, 0, 21, 0x2C4, STR_0175_DISPLAY_MAP_TOWN_DIRECTORY},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 400, 421, 0, 21, 0x2DF, STR_017F_ZOOM_THE_VIEW_IN},
-{ WWT_PANEL, RESIZE_NONE, 14, 422, 443, 0, 21, 0x2E0, STR_0180_ZOOM_THE_VIEW_OUT},
-
-{ WWT_PANEL, RESIZE_NONE, 14, 452, 473, 0, 21, 0xFF3, STR_022E_LANDSCAPE_GENERATION},
-{ WWT_PANEL, RESIZE_NONE, 14, 474, 495, 0, 21, 0xFED, STR_022F_TOWN_GENERATION},
-{ WWT_PANEL, RESIZE_NONE, 14, 496, 517, 0, 21, 0x2E5, STR_0230_INDUSTRY_GENERATION},
-{ WWT_PANEL, RESIZE_NONE, 14, 518, 539, 0, 21, 0x2D8, STR_0231_ROAD_CONSTRUCTION},
-{ WWT_PANEL, RESIZE_NONE, 14, 540, 561, 0, 21, 0x2E6, STR_0288_PLANT_TREES},
-{ WWT_PANEL, RESIZE_NONE, 14, 562, 583, 0, 21, 0xFF2, STR_0289_PLACE_SIGN},
-
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, 0x2C9, STR_01D4_SHOW_SOUND_MUSIC_WINDOW},
-{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, 0x2D3, STR_0186_LAND_BLOCK_INFORMATION},
-{ WIDGETS_END},
+{ WWT_PANEL, RESIZE_NONE, 14, 0, 21, 0, 21, SPR_IMG_PAUSE, STR_0171_PAUSE_GAME},
+{ WWT_PANEL, RESIZE_NONE, 14, 22, 43, 0, 21, SPR_IMG_FASTFORWARD, STR_FAST_FORWARD},
+{ WWT_PANEL, RESIZE_NONE, 14, 44, 65, 0, 21, SPR_IMG_SETTINGS, STR_0187_OPTIONS},
+{WWT_PANEL_2, RESIZE_NONE, 14, 66, 87, 0, 21, SPR_IMG_SAVE, STR_0297_SAVE_SCENARIO_LOAD_SCENARIO},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 96, 225, 0, 21, 0x0, STR_NULL},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 233, 362, 0, 21, 0x0, STR_NULL},
+{ WWT_IMGBTN, RESIZE_NONE, 14, 236, 247, 5, 16, SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE},
+{ WWT_IMGBTN, RESIZE_NONE, 14, 347, 358, 5, 16, SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 371, 392, 0, 21, SPR_IMG_SMALLMAP, STR_0175_DISPLAY_MAP_TOWN_DIRECTORY},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 400, 421, 0, 21, SPR_IMG_ZOOMIN, STR_017F_ZOOM_THE_VIEW_IN},
+{ WWT_PANEL, RESIZE_NONE, 14, 422, 443, 0, 21, SPR_IMG_ZOOMOUT, STR_0180_ZOOM_THE_VIEW_OUT},
+
+{ WWT_PANEL, RESIZE_NONE, 14, 452, 473, 0, 21, SPR_IMG_LANDSCAPING, STR_022E_LANDSCAPE_GENERATION},
+{ WWT_PANEL, RESIZE_NONE, 14, 474, 495, 0, 21, SPR_IMG_TOWN, STR_022F_TOWN_GENERATION},
+{ WWT_PANEL, RESIZE_NONE, 14, 496, 517, 0, 21, SPR_IMG_INDUSTRY, STR_0230_INDUSTRY_GENERATION},
+{ WWT_PANEL, RESIZE_NONE, 14, 518, 539, 0, 21, SPR_IMG_BUILDROAD, STR_0231_ROAD_CONSTRUCTION},
+{ WWT_PANEL, RESIZE_NONE, 14, 540, 561, 0, 21, SPR_IMG_PLANTTREES, STR_0288_PLANT_TREES},
+{ WWT_PANEL, RESIZE_NONE, 14, 562, 583, 0, 21, SPR_IMG_SIGN, STR_0289_PLACE_SIGN},
+
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_PANEL, RESIZE_NONE, 14, 596, 617, 0, 21, SPR_IMG_MUSIC, STR_01D4_SHOW_SOUND_MUSIC_WINDOW},
+{ WWT_EMPTY, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
+{ WWT_PANEL, RESIZE_NONE, 14, 618, 639, 0, 21, SPR_IMG_QUERY, STR_0186_LAND_BLOCK_INFORMATION},
+{WIDGETS_END},
};
static ToolbarButtonProc* const _scen_toolbar_button_procs[] = {
@@ -2268,7 +2268,7 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
}
static const Widget _main_status_widgets[] = {
-{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 139, 0, 11, 0x0, STR_NULL},
+{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 139, 0, 11, 0x0, STR_NULL},
{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 140, 499, 0, 11, 0x0, STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS},
{ WWT_PUSHIMGBTN, RESIZE_NONE, 14, 500, 639, 0, 11, 0x0, STR_NULL},
{ WIDGETS_END},