From 14300d309c01591b9dd2b4c8fb0180fec69bddb0 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 24 Nov 2009 18:05:55 +0000 Subject: (svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions --- src/ai/ai_gui.cpp | 37 +++---- src/airport_gui.cpp | 15 +-- src/autoreplace_gui.cpp | 15 ++- src/bridge_gui.cpp | 6 +- src/build_vehicle_gui.cpp | 6 +- src/cheat_gui.cpp | 6 +- src/company_gui.cpp | 20 ++-- src/depot_gui.cpp | 9 +- src/dock_gui.cpp | 28 ++---- src/engine_gui.cpp | 6 +- src/genworld_gui.cpp | 19 ++-- src/graph_gui.cpp | 51 ++++------ src/group_gui.cpp | 9 +- src/industry_gui.cpp | 30 ++---- src/intro_gui.cpp | 189 ++++++++++++++++++------------------ src/misc_gui.cpp | 33 +++---- src/music_gui.cpp | 12 +-- src/network/network_content_gui.cpp | 13 +-- src/network/network_gui.cpp | 44 +++------ src/newgrf_gui.cpp | 18 ++-- src/news_gui.cpp | 17 ++-- src/order_gui.cpp | 21 ++-- src/rail_gui.cpp | 36 +++---- src/road_gui.cpp | 27 +++--- src/settings_gui.cpp | 24 ++--- src/signs_gui.cpp | 12 +-- src/smallmap_gui.cpp | 9 +- src/station_gui.cpp | 21 ++-- src/station_gui.h | 23 ++--- src/subsidy_gui.cpp | 12 +-- src/terraform_gui.cpp | 20 ++-- src/timetable_gui.cpp | 9 +- src/town_gui.cpp | 42 +++----- src/transparency_gui.cpp | 10 +- src/tree_gui.cpp | 6 +- src/vehicle_gui.cpp | 36 +++---- src/vehicle_gui.h | 3 - src/viewport_gui.cpp | 9 +- src/waypoint_gui.cpp | 6 +- 39 files changed, 349 insertions(+), 560 deletions(-) (limited to 'src') diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 270e6ed1a..14c8b8b84 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -33,15 +33,12 @@ /** Enum referring to the widgets of the AI list window */ enum AIListWindowWidgets { - AIL_WIDGET_CLOSEBOX = 0, ///< Close window button - AIL_WIDGET_CAPTION, ///< Window caption AIL_WIDGET_LIST, ///< The matrix with all available AIs AIL_WIDGET_SCROLLBAR, ///< Scrollbar next to the AI list AIL_WIDGET_INFO_BG, ///< Panel to draw some AI information on AIL_WIDGET_ACCEPT, ///< Accept button AIL_WIDGET_CANCEL, ///< Cancel button AIL_WIDGET_CONTENT_DOWNLOAD, ///< Download content button - AIL_WIDGET_RESIZE, ///< Resize button }; /** @@ -211,8 +208,8 @@ struct AIListWindow : public Window { static const NWidgetPart _nested_ai_list_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, AIL_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_MAUVE, AIL_WIDGET_CAPTION), SetDataTip(STR_AI_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_MATRIX, COLOUR_MAUVE, AIL_WIDGET_LIST), SetMinimalSize(188, 112), SetFill(1, 1), SetResize(1, 1), SetDataTip(0x501, STR_AI_LIST_TOOLTIP), @@ -226,7 +223,7 @@ static const NWidgetPart _nested_ai_list_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, AIL_WIDGET_CONTENT_DOWNLOAD), SetMinimalSize(188, 12), SetResize(1, 0), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), - NWidget(WWT_RESIZEBOX, COLOUR_MAUVE, AIL_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), }; @@ -246,13 +243,10 @@ static void ShowAIListWindow(CompanyID slot) /** Enum referring to the widgets of the AI settings window */ enum AISettingsWindowWidgest { - AIS_WIDGET_CLOSEBOX = 0, ///< Close window button - AIS_WIDGET_CAPTION, ///< Window caption AIS_WIDGET_BACKGROUND, ///< Panel to draw the settings on AIS_WIDGET_SCROLLBAR, ///< Scrollbar to scroll through all settings AIS_WIDGET_ACCEPT, ///< Accept button AIS_WIDGET_RESET, ///< Reset button - AIS_WIDGET_RESIZE, ///< Resize button }; /** @@ -425,8 +419,8 @@ struct AISettingsWindow : public Window { static const NWidgetPart _nested_ai_settings_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, AIS_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_MAUVE, AIS_WIDGET_CAPTION), SetDataTip(STR_AI_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_MATRIX, COLOUR_MAUVE, AIS_WIDGET_BACKGROUND), SetMinimalSize(188, 182), SetResize(1, 1), SetFill(1, 0), SetDataTip(0x501, STR_NULL), @@ -437,7 +431,7 @@ static const NWidgetPart _nested_ai_settings_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, AIS_WIDGET_ACCEPT), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL), NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, AIS_WIDGET_RESET), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_SETTINGS_RESET, STR_NULL), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_MAUVE, AIS_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), }; @@ -458,8 +452,6 @@ static void ShowAISettingsWindow(CompanyID slot) /** Enum referring to the widgets of the AI config window */ enum AIConfigWindowWidgets { - AIC_WIDGET_CLOSEBOX = 0, ///< Close window button - AIC_WIDGET_CAPTION, ///< Window caption AIC_WIDGET_BACKGROUND, ///< Window background AIC_WIDGET_DECREASE, ///< Decrease the number of AIs AIC_WIDGET_INCREASE, ///< Increase the number of AIs @@ -469,13 +461,12 @@ enum AIConfigWindowWidgets { AIC_WIDGET_CHANGE, ///< Select another AI button AIC_WIDGET_CONFIGURE, ///< Change AI settings button AIC_WIDGET_CLOSE, ///< Close window button - AIC_WIDGET_RESIZE, ///< Resize button }; static const NWidgetPart _nested_ai_config_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, AIC_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_MAUVE, AIC_WIDGET_CAPTION), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_MAUVE, AIC_WIDGET_BACKGROUND), NWidget(NWID_VERTICAL), SetPIP(4, 0, 4), @@ -660,9 +651,6 @@ void ShowAIConfigWindow() /** Enum referring to the widgets of the AI debug window */ enum AIDebugWindowWidgets { - AID_WIDGET_CLOSEBOX = 0, - AID_WIDGET_CAPTION, - AID_WIDGET_STICKY, AID_WIDGET_VIEW, AID_WIDGET_NAME_TEXT, AID_WIDGET_RELOAD_TOGGLE, @@ -670,7 +658,6 @@ enum AIDebugWindowWidgets { AID_WIDGET_SCROLLBAR, AID_WIDGET_COMPANY_BUTTON_START, AID_WIDGET_COMPANY_BUTTON_END = AID_WIDGET_COMPANY_BUTTON_START + 14, - AID_WIDGET_RESIZE, }; /** @@ -911,9 +898,9 @@ CompanyID AIDebugWindow::ai_debug_company = INVALID_COMPANY; static const NWidgetPart _nested_ai_debug_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, AID_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, AID_WIDGET_CAPTION), SetDataTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, AID_WIDGET_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, AID_WIDGET_VIEW), NWidget(NWID_HORIZONTAL), @@ -966,7 +953,7 @@ static const NWidgetPart _nested_ai_debug_widgets[] = { EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_GREY, AID_WIDGET_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, AID_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), }; diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 37fc2d18e..115127d60 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -50,9 +50,6 @@ static void PlaceAirport(TileIndex tile) /** Widget number of the airport build window. */ enum { - ATW_CLOSEBOX, - ATW_CAPTION, - ATW_STICKYBOX, ATW_AIRPORT, ATW_DEMOLISH, ATW_SPACER, @@ -139,9 +136,9 @@ struct BuildAirToolbarWindow : Window { static const NWidgetPart _nested_air_toolbar_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, ATW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, ATW_CAPTION), SetDataTip(STR_TOOLBAR_AIRCRAFT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, ATW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TOOLBAR_AIRCRAFT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ATW_AIRPORT), SetFill(0, 1), SetMinimalSize(42, 22), SetDataTip(SPR_IMG_AIRPORT, STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP), @@ -167,8 +164,6 @@ void ShowBuildAirToolbar() /** Airport widgets in the airport picker window. */ enum AirportPickerWidgets { - BAW_CLOSEBOX, - BAW_CAPTION, /* Panels and labels. */ BAW_SMALL_AIRPORTS_PANEL, BAW_SMALL_AIRPORTS_LABEL, @@ -301,8 +296,8 @@ public: static const NWidgetPart _nested_build_airport_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BAW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BAW_CAPTION), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), /* Small airports. */ NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BAW_SMALL_AIRPORTS_PANEL), diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index b014d726d..544c5b49e 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -33,9 +33,7 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList * /** Widget numbers of the autoreplace GUI. */ enum ReplaceVehicleWindowWidgets { - RVW_WIDGET_CLOSEBOX, RVW_WIDGET_CAPTION, - RVW_WIDGET_STICKY, /* Left and right matrix + details. */ RVW_WIDGET_LEFT_MATRIX, @@ -49,7 +47,6 @@ enum ReplaceVehicleWindowWidgets { RVW_WIDGET_START_REPLACE, RVW_WIDGET_INFO_TAB, RVW_WIDGET_STOP_REPLACE, - RVW_WIDGET_RESIZE, /* Train only widgets. */ RVW_WIDGET_TRAIN_ENGINEWAGON_TOGGLE, @@ -502,9 +499,9 @@ public: static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, RVW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, RVW_WIDGET_CAPTION), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, RVW_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_MATRIX, COLOUR_GREY, RVW_WIDGET_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetDataTip(0x1, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), @@ -528,7 +525,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = { NWidget(WWT_DROPDOWN, COLOUR_GREY, RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetResize(1, 0), NWidget(WWT_PANEL, COLOUR_GREY, RVW_WIDGET_TRAIN_FLUFF_RIGHT), SetMinimalSize(16, 12), EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, RVW_WIDGET_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, RVW_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -541,9 +538,9 @@ static const WindowDesc _replace_rail_vehicle_desc( static const NWidgetPart _nested_replace_vehicle_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, RVW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, RVW_WIDGET_CAPTION), SetMinimalSize(433, 14), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, RVW_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_MATRIX, COLOUR_GREY, RVW_WIDGET_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetDataTip(0x1, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), @@ -559,7 +556,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, RVW_WIDGET_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON), NWidget(WWT_PANEL, COLOUR_GREY, RVW_WIDGET_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, RVW_WIDGET_STOP_REPLACE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, RVW_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index bca8066ff..07d660b95 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -56,13 +56,11 @@ void CcBuildBridge(bool success, TileIndex tile, uint32 p1, uint32 p2) /* Names of the build bridge selection window */ enum BuildBridgeSelectionWidgets { - BBSW_CLOSEBOX = 0, BBSW_CAPTION, BBSW_DROPDOWN_ORDER, BBSW_DROPDOWN_CRITERIA, BBSW_BRIDGE_LIST, BBSW_SCROLLBAR, - BBSW_RESIZEBOX }; class BuildBridgeWindow : public Window { @@ -312,7 +310,7 @@ const StringID BuildBridgeWindow::sorter_names[] = { static const NWidgetPart _nested_build_bridge_widgets[] = { /* Header */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BBSW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BBSW_CAPTION), SetDataTip(STR_SELECT_RAIL_BRIDGE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), @@ -330,7 +328,7 @@ static const NWidgetPart _nested_build_bridge_widgets[] = { /* scrollbar + resize button */ NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_DARK_GREEN, BBSW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, BBSW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN), EndContainer(), EndContainer(), }; diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index a740cdc76..661c6d2d2 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -46,7 +46,6 @@ uint GetEngineListHeight(VehicleType type) } enum BuildVehicleWidgets { - BUILD_VEHICLE_WIDGET_CLOSEBOX = 0, BUILD_VEHICLE_WIDGET_CAPTION, BUILD_VEHICLE_WIDGET_LIST_CONTROL, BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING, @@ -58,13 +57,12 @@ enum BuildVehicleWidgets { BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_BUILD_SEL, BUILD_VEHICLE_WIDGET_RENAME, - BUILD_VEHICLE_WIDGET_RESIZE, BUILD_VEHICLE_WIDGET_END }; static const NWidgetPart _nested_build_vehicle_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, BUILD_VEHICLE_WIDGET_LIST_CONTROL), @@ -92,7 +90,7 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BUILD_VEHICLE_WIDGET_BUILD), SetResize(1, 0), SetFill(1, 0), EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BUILD_VEHICLE_WIDGET_RENAME), SetResize(1, 0), SetFill(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, BUILD_VEHICLE_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 183edad11..1740ca163 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -133,15 +133,13 @@ static const CheatEntry _cheats_ui[] = { /* Names of the cheat window widgets. */ enum CheatWidgets { - CW_CLOSEBOX, - CW_CAPTION, CW_PANEL, }; static const NWidgetPart _nested_cheat_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, CW_CAPTION), SetDataTip(STR_CHEATS, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_CHEATS, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CW_PANEL), SetDataTip(0x0, STR_CHEATS_TOOLTIP), EndContainer(), }; diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 53e57d887..48a1778bf 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -122,10 +122,8 @@ static const ExpensesList _expenses_list_types[] = { /** Widgets of the company finances windows. */ enum CompanyFinancesWindowWidgets { - CFW_CLOSEBOX = 0, ///< Close the window CFW_CAPTION, ///< Caption of the window CFW_TOGGLE_SIZE, ///< Toggle windows size - CFW_STICKY, ///< Sticky button CFW_EXPS_PANEL, ///< Panel for expenses CFW_SEL_PANEL, ///< Select panel or nothing CFW_EXPS_CATEGORY, ///< Column for expenses category strings @@ -233,10 +231,10 @@ static void DrawYearColumn(const Rect &r, int year, const Money (*tbl)[EXPENSES_ static const NWidgetPart _nested_company_finances_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CFW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, CFW_CAPTION), SetDataTip(STR_FINANCES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_IMGBTN, COLOUR_GREY, CFW_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW), - NWidget(WWT_STICKYBOX, COLOUR_GREY, CFW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_SELECTION, INVALID_COLOUR, CFW_SEL_PANEL), NWidget(WWT_PANEL, COLOUR_GREY, CFW_EXPS_PANEL), @@ -547,7 +545,6 @@ public: /** Widgets of the select company livery window. */ enum SelectCompanyLiveryWindowWidgets { - SCLW_WIDGET_CLOSE, SCLW_WIDGET_CAPTION, SCLW_WIDGET_CLASS_GENERAL, SCLW_WIDGET_CLASS_RAIL, @@ -802,7 +799,7 @@ public: static const NWidgetPart _nested_select_company_livery_widgets [] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SCLW_WIDGET_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SCLW_WIDGET_CAPTION), SetDataTip(STR_LIVERY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -879,7 +876,6 @@ void DrawCompanyManagerFace(CompanyManagerFace cmf, int colour, int x, int y) * this order is needed for the WE_CLICK event of DrawFaceStringLabel(). */ enum SelectCompanyManagerFaceWidgets { - SCMFW_WIDGET_CLOSEBOX = 0, SCMFW_WIDGET_CAPTION, SCMFW_WIDGET_TOGGLE_LARGE_SMALL, SCMFW_WIDGET_SELECT_FACE, @@ -934,7 +930,7 @@ enum SelectCompanyManagerFaceWidgets { /** Nested widget description for the normal/simple company manager face selection dialog */ static const NWidgetPart _nested_select_company_manager_face_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SCMFW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SCMFW_WIDGET_CAPTION), SetDataTip(STR_FACE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_IMGBTN, COLOUR_GREY, SCMFW_WIDGET_TOGGLE_LARGE_SMALL), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_ADVANCED_TOOLTIP), EndContainer(), @@ -965,7 +961,7 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = { /** Nested widget description for the advanced company manager face selection dialog */ static const NWidgetPart _nested_select_company_manager_face_adv_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SCMFW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SCMFW_WIDGET_CAPTION), SetDataTip(STR_FACE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_IMGBTN, COLOUR_GREY, SCMFW_WIDGET_TOGGLE_LARGE_SMALL), SetMinimalSize(15, 14), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_SIMPLE_TOOLTIP), EndContainer(), @@ -1435,7 +1431,6 @@ static void DoSelectCompanyManagerFace(Window *parent, bool adv, int top, int le /** Names of the widgets of the #CompanyWindow. Keep them in the same order as in the widget array */ enum CompanyWindowWidgets { - CW_WIDGET_CLOSEBOX = 0, CW_WIDGET_CAPTION, CW_WIDGET_BACKGROUND, @@ -1472,7 +1467,7 @@ enum CompanyWindowWidgets { static const NWidgetPart _nested_company_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, CW_WIDGET_CAPTION), SetDataTip(STR_COMPANY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CW_WIDGET_BACKGROUND), @@ -1913,7 +1908,6 @@ void ShowCompany(CompanyID company) /** widget numbers of the #BuyCompanyWindow. */ enum BuyCompanyWidgets { - BCW_CLOSEBOX, BCW_CAPTION, BCW_BACKGROUND, BCW_FACE, @@ -1992,7 +1986,7 @@ struct BuyCompanyWindow : Window { static const NWidgetPart _nested_buy_company_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, BCW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, BCW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, BCW_BACKGROUND), diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index d9f49d467..b39be495c 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -41,9 +41,7 @@ /* Names of the widgets. Keep them in the same order as in the widget array */ enum DepotWindowWidgets { - DEPOT_WIDGET_CLOSEBOX = 0, DEPOT_WIDGET_CAPTION, - DEPOT_WIDGET_STICKY, DEPOT_WIDGET_SELL, DEPOT_WIDGET_SELL_CHAIN, DEPOT_WIDGET_SELL_ALL, @@ -57,15 +55,14 @@ enum DepotWindowWidgets { DEPOT_WIDGET_VEHICLE_LIST, DEPOT_WIDGET_STOP_ALL, DEPOT_WIDGET_START_ALL, - DEPOT_WIDGET_RESIZE, }; /** Nested widget definition for train depots. */ static const NWidgetPart _nested_train_depot_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, DEPOT_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, DEPOT_WIDGET_CAPTION), - NWidget(WWT_STICKYBOX, COLOUR_GREY, DEPOT_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_VERTICAL), @@ -87,7 +84,7 @@ static const NWidgetPart _nested_train_depot_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, DEPOT_WIDGET_VEHICLE_LIST), SetDataTip(0x0, STR_NULL), SetFill(0, 1), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, DEPOT_WIDGET_STOP_ALL), SetDataTip(SPR_FLAG_VEH_STOPPED, STR_NULL), SetFill(0, 1), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, DEPOT_WIDGET_START_ALL), SetDataTip(SPR_FLAG_VEH_RUNNING, STR_NULL), SetFill(0, 1), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, DEPOT_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index af72370ba..2731eae27 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -91,10 +91,6 @@ static void PlaceDocks_Aqueduct(TileIndex tile) /** Enum referring to the widgets of the build dock toolbar */ enum DockToolbarWidgets { - DTW_BEGIN = 0, ///< Start of toolbar widgets - DTW_CLOSEBOX = DTW_BEGIN, ///< Close window button - DTW_CAPTION, ///< Window caption - DTW_STICKY, ///< Sticky window button DTW_BUTTONS_BEGIN, ///< Begin of clickable buttons (except seperating panel) DTW_CANAL = DTW_BUTTONS_BEGIN, ///< Build canal button DTW_LOCK, ///< Build lock button @@ -268,9 +264,9 @@ struct BuildDocksToolbarWindow : Window { */ static const NWidgetPart _nested_build_docks_toolbar_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, DTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, DTW_CAPTION), SetDataTip(STR_WATERWAYS_TOOLBAR_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, DTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_WATERWAYS_TOOLBAR_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL_LTR), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_CANAL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUILD_CANAL, STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP), @@ -305,9 +301,9 @@ void ShowBuildDocksToolbar() */ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, DTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, DTW_CAPTION), SetDataTip(STR_WATERWAYS_TOOLBAR_CAPTION_SE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, DTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_WATERWAYS_TOOLBAR_CAPTION_SE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_CANAL), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUILD_CANAL, STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP), @@ -334,8 +330,6 @@ void ShowBuildDocksScenToolbar() /** Widget numbers of the build-dock GUI. */ enum BuildDockStationWidgets { - BDSW_CLOSE, ///< Closebox. - BDSW_CAPTION, ///< Titlebar. BDSW_BACKGROUND, ///< Background panel. BDSW_LT_OFF, ///< 'Off' button of coverage high light. BDSW_LT_ON, ///< 'On' button of coverage high light. @@ -403,8 +397,8 @@ public: /** Nested widget parts of a build dock station window. */ static const NWidgetPart _nested_build_dock_station_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BDSW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BDSW_CAPTION), SetDataTip(STR_STATION_BUILD_DOCK_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_DOCK_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BDSW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 3), @@ -431,8 +425,6 @@ static void ShowBuildDockStationPicker(Window *parent) /** Widgets for the build ship depot window. */ enum BuildDockDepotWidgets { - BDDW_CLOSE, - BDDW_CAPTION, BDDW_BACKGROUND, BDDW_X, BDDW_Y, @@ -485,8 +477,8 @@ public: static const NWidgetPart _nested_build_docks_depot_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BDDW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BDDW_CAPTION), SetDataTip(STR_DEPOT_BUILD_SHIP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_DEPOT_BUILD_SHIP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BDDW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 3), diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index c7ffc530c..f144a3f61 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -44,8 +44,6 @@ StringID GetEngineCategoryName(EngineID engine) /** Widgets used for the engine preview window */ enum EnginePreviewWidgets { - EPW_CLOSE, ///< Close button - EPW_CAPTION, ///< Title bar/caption EPW_BACKGROUND, ///< Background EPW_QUESTION, ///< The container for the question EPW_NO, ///< No button @@ -54,8 +52,8 @@ enum EnginePreviewWidgets { static const NWidgetPart _nested_engine_preview_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, EPW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, EPW_CAPTION), SetDataTip(STR_ENGINE_PREVIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_ENGINE_PREVIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, EPW_BACKGROUND), NWidget(WWT_EMPTY, INVALID_COLOUR, EPW_QUESTION), SetMinimalSize(300, 0), SetPadding(8, 8, 8, 8), SetFill(1, 0), diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index fb581383b..4f261f947 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -56,8 +56,6 @@ static inline void SetNewLandscapeType(byte landscape) } enum GenerateLandscapeWindowWidgets { - GLAND_CLOSEBOX, - GLAND_TITLEBAR, GLAND_BACKGROUND, GLAND_TEMPERATE, @@ -124,8 +122,8 @@ enum GenerateLandscapeWindowWidgets { static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, GLAND_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, GLAND_TITLEBAR), SetDataTip(STR_MAPGEN_WORLD_GENERATION_CAPTION, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_MAPGEN_WORLD_GENERATION_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, GLAND_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 10), @@ -235,8 +233,8 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { static const NWidgetPart _nested_heightmap_load_widgets[] = { /* Window header. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, GLAND_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, GLAND_TITLEBAR), SetDataTip(STR_MAPGEN_WORLD_GENERATION_CAPTION, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_MAPGEN_WORLD_GENERATION_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, GLAND_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 10), @@ -831,8 +829,6 @@ void StartNewGameWithoutGUI(uint seed) /** Widget numbers of the create scenario window. */ enum CreateScenarioWindowWidgets { - CSCEN_CLOSEBOX, ///< Close button. - CSCEN_CAPTION, ///< Title bar. CSCEN_BACKGROUND, ///< Background panel. CSCEN_TEMPERATE, ///< Select temperate landscape style. CSCEN_ARCTIC, ///< Select arctic landscape style. @@ -1036,8 +1032,8 @@ struct CreateScenarioWindow : public Window static const NWidgetPart _nested_create_scenario_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, CSCEN_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, CSCEN_CAPTION), SetDataTip(STR_SE_MAPGEN_CAPTION, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_SE_MAPGEN_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, CSCEN_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 10), @@ -1100,7 +1096,6 @@ void ShowCreateScenario() } enum GenerationProgressWindowWidgets { - GPWW_CAPTION, GPWW_BACKGROUND, GPWW_PROGRESS_BAR, GPWW_PROGRESS_TEXT, @@ -1108,7 +1103,7 @@ enum GenerationProgressWindowWidgets { }; static const NWidgetPart _nested_generate_progress_widgets[] = { - NWidget(WWT_CAPTION, COLOUR_GREY, GPWW_CAPTION), SetDataTip(STR_GENERATION_WORLD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GENERATION_WORLD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PANEL, COLOUR_GREY, GPWW_BACKGROUND), NWidget(NWID_HORIZONTAL), SetPIP(20, 0, 20), NWidget(NWID_VERTICAL), SetPIP(11, 8, 11), diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index bda24d0cd..d8676aa17 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -40,8 +40,6 @@ static const uint INVALID_DATAPOINT_POS = UINT_MAX; // Used to determine if the /** Widget numbers of the graph legend window. */ enum GraphLegendWidgetNumbers { - GLW_CLOSEBOX, - GLW_CAPTION, GLW_BACKGROUND, GLW_FIRST_COMPANY, @@ -128,8 +126,8 @@ static NWidgetBase *MakeNWidgetCompanyLines(int *biggest_index) static const NWidgetPart _nested_graph_legend_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, GLW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, GLW_CAPTION), SetDataTip(STR_GRAPH_KEY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_KEY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, GLW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 2), @@ -159,8 +157,6 @@ static void ShowGraphLegend() /** Widget numbers of a base graph window. */ enum CompanyValueWidgets { - BGW_CLOSEBOX, - BGW_CAPTION, BGW_KEY_BUTTON, BGW_BACKGROUND, }; @@ -599,8 +595,8 @@ struct OperatingProfitGraphWindow : BaseGraphWindow { static const NWidgetPart _nested_operating_profit_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, BGW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, BGW_CAPTION), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 160), EndContainer(), @@ -639,8 +635,8 @@ struct IncomeGraphWindow : BaseGraphWindow { static const NWidgetPart _nested_income_graph_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, BGW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, BGW_CAPTION), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 128), EndContainer(), @@ -678,8 +674,8 @@ struct DeliveredCargoGraphWindow : BaseGraphWindow { static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, BGW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, BGW_CAPTION), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 128), EndContainer(), @@ -703,8 +699,6 @@ void ShowDeliveredCargoGraph() /** Widget numbers of the performance history window. */ enum PerformanceHistoryGraphWidgets { - PHW_CLOSEBOX, - PHW_CAPTION, PHW_KEY, PHW_DETAILED_PERFORMANCE, PHW_BACKGROUND, @@ -731,8 +725,8 @@ struct PerformanceHistoryGraphWindow : BaseGraphWindow { static const NWidgetPart _nested_performance_history_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, PHW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, PHW_CAPTION), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, PHW_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, PHW_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), EndContainer(), @@ -770,8 +764,8 @@ struct CompanyValueGraphWindow : BaseGraphWindow { static const NWidgetPart _nested_company_value_graph_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, BGW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, BGW_CAPTION), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 224), EndContainer(), @@ -795,8 +789,6 @@ void ShowCompanyValueGraph() /** Widget numbers of the cargo payment rates. */ enum CargoPaymentRatesWidgets { - CPW_CLOSEBOX, - CPW_CAPTION, CPW_BACKGROUND, CPW_HEADER, CPW_GRAPH, @@ -922,8 +914,8 @@ static NWidgetBase *MakeCargoButtons(int *biggest_index) static const NWidgetPart _nested_cargo_payment_rates_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CPW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, CPW_CAPTION), SetDataTip(STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CPW_BACKGROUND), SetMinimalSize(568, 128), SetResize(0, 1), NWidget(NWID_VERTICAL), @@ -969,9 +961,6 @@ void ShowCargoPaymentRates() /** Widget numbers for the company league window. */ enum CompanyLeagueWidgets { - CLW_CLOSEBOX, - CLW_CAPTION, - CLW_STICKYBOX, CLW_BACKGROUND, }; @@ -1126,9 +1115,9 @@ public: static const NWidgetPart _nested_company_league_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CLW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, CLW_CAPTION), SetDataTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, CLW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CLW_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM), }; @@ -1151,8 +1140,6 @@ void ShowCompanyLeagueTable() /** Widget numbers of the performance rating details window. */ enum PerformanceRatingDetailsWidgets { - PRW_CLOSEBOX, - PRW_CAPTION, PRW_BACKGROUND, PRW_SCORE_FIRST, @@ -1466,8 +1453,8 @@ static NWidgetBase *MakeCompanyButtonRows(int *biggest_index) static const NWidgetPart _nested_performance_rating_detail_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, PRW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, PRW_CAPTION), SetDataTip(STR_PERFORMANCE_DETAIL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_PERFORMANCE_DETAIL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, PRW_BACKGROUND), NWidgetFunction(MakeCompanyButtonRows), SetPadding(0, 1, 1, 2), diff --git a/src/group_gui.cpp b/src/group_gui.cpp index f7f5e62e5..38df39e3b 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -34,9 +34,7 @@ typedef GUIList GUIGroupList; enum GroupListWidgets { - GRP_WIDGET_CLOSEBOX = 0, GRP_WIDGET_CAPTION, - GRP_WIDGET_STICKY, GRP_WIDGET_SORT_BY_ORDER, GRP_WIDGET_SORT_BY_DROPDOWN, GRP_WIDGET_EMPTY_TOP_RIGHT, @@ -48,7 +46,6 @@ enum GroupListWidgets { GRP_WIDGET_STOP_ALL, GRP_WIDGET_START_ALL, GRP_WIDGET_EMPTY_BOTTOM_RIGHT, - GRP_WIDGET_RESIZE, GRP_WIDGET_EMPTY_TOP_LEFT, GRP_WIDGET_ALL_VEHICLES, @@ -93,9 +90,9 @@ static void ShowGroupActionDropdown(Window *w, GroupID gid) static const NWidgetPart _nested_group_widgets[] = { NWidget(NWID_HORIZONTAL), // Window header - NWidget(WWT_CLOSEBOX, COLOUR_GREY, GRP_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, GRP_WIDGET_CAPTION), - NWidget(WWT_STICKYBOX, COLOUR_GREY, GRP_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), /* left part */ @@ -142,7 +139,7 @@ static const NWidgetPart _nested_group_widgets[] = { NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, GRP_WIDGET_START_ALL), SetMinimalSize(12, 12), SetFill(0, 1), SetDataTip(SPR_FLAG_VEH_RUNNING, STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_EMPTY_BOTTOM_RIGHT), SetMinimalSize(0, 12), SetFill(1, 1), SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, GRP_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), EndContainer(), diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 0b09ad780..32423f318 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -97,19 +97,16 @@ static inline void GetAllCargoSuffixes(uint cb_offset, CargoSuffixType cst, cons /** Names of the widgets of the dynamic place industries gui */ enum DynamicPlaceIndustriesWidgets { - DPIW_CLOSEBOX = 0, - DPIW_CAPTION, DPIW_MATRIX_WIDGET, DPIW_SCROLLBAR, DPIW_INFOPANEL, DPIW_FUND_WIDGET, - DPIW_RESIZE_WIDGET, }; static const NWidgetPart _nested_build_industry_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, DPIW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, DPIW_CAPTION), SetDataTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_MATRIX, COLOUR_DARK_GREEN, DPIW_MATRIX_WIDGET), SetDataTip(0x801, STR_FUND_INDUSTRY_SELECTION_TOOLTIP), SetFill(1, 0), SetResize(1, 1), @@ -119,7 +116,7 @@ static const NWidgetPart _nested_build_industry_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, DPIW_FUND_WIDGET), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_NULL), - NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, DPIW_RESIZE_WIDGET), + NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN), EndContainer(), }; @@ -556,16 +553,13 @@ static inline bool IsProductionAlterable(const Industry *i) /** Names of the widgets of the view industry gui */ enum IndustryViewWidgets { - IVW_CLOSEBOX = 0, IVW_CAPTION, - IVW_STICKY, IVW_BACKGROUND, IVW_INSET, IVW_VIEWPORT, IVW_INFO, IVW_GOTO, IVW_SPACER, - IVW_RESIZE, }; class IndustryViewWindow : public Window @@ -800,9 +794,9 @@ static void UpdateIndustryProduction(Industry *i) /** Widget definition of the view industy gui */ static const NWidgetPart _nested_industry_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_CREAM, IVW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_CREAM), NWidget(WWT_CAPTION, COLOUR_CREAM, IVW_CAPTION), SetDataTip(STR_INDUSTRY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_CREAM, IVW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_CREAM), EndContainer(), NWidget(WWT_PANEL, COLOUR_CREAM, IVW_BACKGROUND), NWidget(WWT_INSET, COLOUR_CREAM, IVW_INSET), SetPadding(2, 2, 2, 2), @@ -814,7 +808,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_CREAM, IVW_GOTO), SetMinimalSize(130, 12), SetDataTip(STR_BUTTON_LOCATION, STR_INDUSTRY_VIEW_LOCATION_TOOLTIP), NWidget(WWT_PANEL, COLOUR_CREAM, IVW_SPACER), /*SetMinimalSize(118, 12),*/ SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_CREAM, IVW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_CREAM), EndContainer(), }; @@ -833,23 +827,19 @@ void ShowIndustryViewWindow(int industry) /** Names of the widgets of the industry directory gui */ enum IndustryDirectoryWidgets { - IDW_CLOSEBOX = 0, - IDW_CAPTION, - IDW_STICKY, IDW_DROPDOWN_ORDER, IDW_DROPDOWN_CRITERIA, IDW_SPACER, IDW_INDUSTRY_LIST, IDW_SCROLLBAR, - IDW_RESIZE, }; /** Widget definition of the industy directory gui */ static const NWidgetPart _nested_industry_directory_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, IDW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, IDW_CAPTION), SetDataTip(STR_INDUSTRY_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, IDW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INDUSTRY_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_VERTICAL), @@ -864,7 +854,7 @@ static const NWidgetPart _nested_industry_directory_widgets[] = { EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_BROWN, IDW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, IDW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), EndContainer(), }; diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index a0c5f22d1..851d8d96f 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -36,8 +36,7 @@ static inline void SetNewLandscapeType(byte landscape) } enum SelectGameIntroWidgets { - SGI_CLOSE, - SGI_CAPTION, + SGI_BACKGROUND, SGI_GENERATE_GAME, SGI_LOAD_GAME, SGI_PLAY_SCENARIO, @@ -153,99 +152,99 @@ struct SelectGameWindow : public Window { }; static const NWidgetPart _nested_select_game_widgets[] = { - NWidget(WWT_CAPTION, COLOUR_BROWN, SGI_CLOSE), SetDataTip(STR_INTRO_CAPTION, STR_NULL), - NWidget(WWT_PANEL, COLOUR_BROWN, SGI_CAPTION), - - NWidget(NWID_SPACER), SetMinimalSize(0, 8), - - /* 'generate game' and 'load game' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_GENERATE_GAME), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_NEW_GAME, STR_INTRO_TOOLTIP_NEW_GAME), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_LOAD_GAME), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_LOAD_GAME, STR_INTRO_TOOLTIP_LOAD_GAME), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 6), - - /* 'play scenario' and 'play heightmap' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_SCENARIO), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_PLAY_SCENARIO, STR_INTRO_TOOLTIP_PLAY_SCENARIO), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_HEIGHTMAP), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_PLAY_HEIGHTMAP, STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 6), - - /* 'edit scenario' and 'play multiplayer' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_EDIT_SCENARIO), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_SCENARIO_EDITOR, STR_INTRO_TOOLTIP_SCENARIO_EDITOR), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_NETWORK), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_MULTIPLAYER, STR_INTRO_TOOLTIP_MULTIPLAYER), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 7), - - /* climate selection buttons */ - NWidget(NWID_HORIZONTAL), - NWidget(NWID_SPACER), SetMinimalSize(10, 0), SetFill(1, 0), - NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TEMPERATE_LANDSCAPE), SetMinimalSize(77, 55), - SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE), - NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), - NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_ARCTIC_LANDSCAPE), SetMinimalSize(77, 55), - SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE), - NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), - NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TROPIC_LANDSCAPE), SetMinimalSize(77, 55), - SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE), - NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), - NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TOYLAND_LANDSCAPE), SetMinimalSize(77, 55), - SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE), - NWidget(NWID_SPACER), SetMinimalSize(10, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 7), - - /* 'game options' and 'difficulty options' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_OPTIONS), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_DIFFICULTIES), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_DIFFICULTY, STR_INTRO_TOOLTIP_DIFFICULTY_OPTIONS), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 6), - - /* 'advanced settings' and 'newgrf settings' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_SETTINGS_OPTIONS), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_ADVANCED_SETTINGS, STR_INTRO_TOOLTIP_ADVANCED_SETTINGS), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_GRF_SETTINGS), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_INTRO_TOOLTIP_NEWGRF_SETTINGS), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 6), - - /* 'online content' and 'ai settings' buttons */ - NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_CONTENT_DOWNLOAD), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), SetPadding(0, 0, 0, 10), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_AI_SETTINGS), SetMinimalSize(158, 12), - SetDataTip(STR_INTRO_AI_SETTINGS, STR_INTRO_TOOLTIP_AI_SETTINGS), SetPadding(0, 10, 0, 0), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 6), - - /* 'exit program' button */ - NWidget(NWID_HORIZONTAL), - NWidget(NWID_SPACER), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_EXIT), SetMinimalSize(128, 12), - SetDataTip(STR_INTRO_QUIT, STR_INTRO_TOOLTIP_QUIT), - NWidget(NWID_SPACER), SetFill(1, 0), - EndContainer(), - - NWidget(NWID_SPACER), SetMinimalSize(0, 8), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INTRO_CAPTION, STR_NULL), + NWidget(WWT_PANEL, COLOUR_BROWN, SGI_BACKGROUND), + + NWidget(NWID_SPACER), SetMinimalSize(0, 8), + + /* 'generate game' and 'load game' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_GENERATE_GAME), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_NEW_GAME, STR_INTRO_TOOLTIP_NEW_GAME), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_LOAD_GAME), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_LOAD_GAME, STR_INTRO_TOOLTIP_LOAD_GAME), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 6), + + /* 'play scenario' and 'play heightmap' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_SCENARIO), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_PLAY_SCENARIO, STR_INTRO_TOOLTIP_PLAY_SCENARIO), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_HEIGHTMAP), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_PLAY_HEIGHTMAP, STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 6), + + /* 'edit scenario' and 'play multiplayer' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_EDIT_SCENARIO), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_SCENARIO_EDITOR, STR_INTRO_TOOLTIP_SCENARIO_EDITOR), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_PLAY_NETWORK), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_MULTIPLAYER, STR_INTRO_TOOLTIP_MULTIPLAYER), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 7), + + /* climate selection buttons */ + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetMinimalSize(10, 0), SetFill(1, 0), + NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TEMPERATE_LANDSCAPE), SetMinimalSize(77, 55), + SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE), + NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), + NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_ARCTIC_LANDSCAPE), SetMinimalSize(77, 55), + SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE), + NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), + NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TROPIC_LANDSCAPE), SetMinimalSize(77, 55), + SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE), + NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), + NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, SGI_TOYLAND_LANDSCAPE), SetMinimalSize(77, 55), + SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE), + NWidget(NWID_SPACER), SetMinimalSize(10, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 7), + + /* 'game options' and 'difficulty options' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_OPTIONS), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_DIFFICULTIES), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_DIFFICULTY, STR_INTRO_TOOLTIP_DIFFICULTY_OPTIONS), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 6), + + /* 'advanced settings' and 'newgrf settings' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_SETTINGS_OPTIONS), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_ADVANCED_SETTINGS, STR_INTRO_TOOLTIP_ADVANCED_SETTINGS), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_GRF_SETTINGS), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_INTRO_TOOLTIP_NEWGRF_SETTINGS), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 6), + + /* 'online content' and 'ai settings' buttons */ + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_CONTENT_DOWNLOAD), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), SetPadding(0, 0, 0, 10), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_AI_SETTINGS), SetMinimalSize(158, 12), + SetDataTip(STR_INTRO_AI_SETTINGS, STR_INTRO_TOOLTIP_AI_SETTINGS), SetPadding(0, 10, 0, 0), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 6), + + /* 'exit program' button */ + NWidget(NWID_HORIZONTAL), + NWidget(NWID_SPACER), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, SGI_EXIT), SetMinimalSize(128, 12), + SetDataTip(STR_INTRO_QUIT, STR_INTRO_TOOLTIP_QUIT), + NWidget(NWID_SPACER), SetFill(1, 0), + EndContainer(), + + NWidget(NWID_SPACER), SetMinimalSize(0, 8), EndContainer(), }; diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 8ca259984..a4f5ee3cb 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -58,15 +58,13 @@ int _caret_timer; /** Widgets for the land info window. */ enum LandInfoWidgets { - LIW_CLOSE, ///< Close the window - LIW_CAPTION, ///< Title bar of the window LIW_BACKGROUND, ///< Background to draw on }; static const NWidgetPart _nested_land_info_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, LIW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, LIW_CAPTION), SetDataTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, LIW_BACKGROUND), EndContainer(), }; @@ -321,8 +319,6 @@ void PlaceLandBlockInfo() /** Widgets for the land info window. */ enum AboutWidgets { - AW_CLOSE, ///< Close the window - AW_CAPTION, ///< Title bar of the window AW_BACKGROUND, ///< Background to draw on AW_ABOUT_ORIG_COPYRIGHT, ///< Text with original copyright info AW_ABOUT_VERSION, ///< OpenTTD version string @@ -334,8 +330,8 @@ enum AboutWidgets { static const NWidgetPart _nested_about_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, AW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, AW_CAPTION), SetDataTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, AW_BACKGROUND), SetPIP(4, 2, 4), NWidget(WWT_TEXT, COLOUR_GREY, AW_ABOUT_ORIG_COPYRIGHT), SetDataTip(STR_ABOUT_ORIGINAL_COPYRIGHT, STR_NULL), @@ -490,7 +486,6 @@ void ShowAboutWindow() /** Widgets of the error message windows */ enum ErrorMessageWidgets { - EMW_CLOSE = 0, EMW_CAPTION, EMW_PANEL, EMW_FACE, @@ -499,7 +494,7 @@ enum ErrorMessageWidgets { static const NWidgetPart _nested_errmsg_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_RED, EMW_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_RED), NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_RED, EMW_PANEL), @@ -516,7 +511,7 @@ static const WindowDesc _errmsg_desc( static const NWidgetPart _nested_errmsg_face_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_RED, EMW_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_RED), NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_RED, EMW_PANEL), @@ -1304,7 +1299,6 @@ void QueryStringBaseWindow::OnOpenOSKWindow(int wid) /** Widget of the string query window. */ enum QueryStringWidgets { - QUERY_STR_WIDGET_CLOSEBOX, QUERY_STR_WIDGET_CAPTION, QUERY_STR_WIDGET_BACKGROUND, QUERY_STR_WIDGET_TEXT, @@ -1427,7 +1421,7 @@ struct QueryStringWindow : public QueryStringBaseWindow static const NWidgetPart _nested_query_string_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, QUERY_STR_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, QUERY_STR_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, QUERY_STR_WIDGET_BACKGROUND), @@ -1465,7 +1459,6 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, uint maxwidth enum QueryWidgets { - QUERY_WIDGET_CLOSEBOX, QUERY_WIDGET_CAPTION, QUERY_WIDGET_BACKGROUND, QUERY_WIDGET_TEXT, @@ -1583,7 +1576,7 @@ struct QueryWindow : public Window { static const NWidgetPart _nested_query_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_RED, QUERY_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_RED), NWidget(WWT_CAPTION, COLOUR_RED, QUERY_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_RED, QUERY_WIDGET_BACKGROUND), SetPIP(8, 15, 8), @@ -1617,7 +1610,6 @@ void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallback enum SaveLoadWindowWidgets { - SLWW_CLOSE = 0, SLWW_WINDOWTITLE, SLWW_SORT_BYNAME, SLWW_SORT_BYDATE, @@ -1630,13 +1622,12 @@ enum SaveLoadWindowWidgets { SLWW_SAVE_OSK_TITLE, ///< only available for save operations SLWW_DELETE_SELECTION, ///< same in here SLWW_SAVE_GAME, ///< not to mention in here too - SLWW_RESIZE, SLWW_CONTENT_DOWNLOAD_SEL, ///< Selection 'stack' to 'hide' the content download }; static const NWidgetPart _nested_load_dialog_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLWW_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), @@ -1657,7 +1648,7 @@ static const NWidgetPart _nested_load_dialog_widgets[] = { NWidget(NWID_VERTICAL), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON), NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLWW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), EndContainer(), @@ -1665,7 +1656,7 @@ static const NWidgetPart _nested_load_dialog_widgets[] = { static const NWidgetPart _nested_save_dialog_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLWW_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), @@ -1688,7 +1679,7 @@ static const NWidgetPart _nested_save_dialog_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_DELETE_SELECTION), SetDataTip(STR_SAVELOAD_DELETE_BUTTON, STR_SAVELOAD_DELETE_TOOLTIP), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SAVE_GAME), SetDataTip(STR_SAVELOAD_SAVE_BUTTON, STR_SAVELOAD_SAVE_TOOLTIP), SetFill(1, 0), SetResize(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLWW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 6052c844b..e17db0d17 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -206,8 +206,6 @@ static void SelectPlaylist(byte list) } enum MusicTrackSelectionWidgets { - MTSW_CLOSE, - MTSW_CAPTION, MTSW_BACKGROUND, MTSW_TRACKLIST, MTSW_LIST_LEFT, @@ -378,8 +376,8 @@ struct MusicTrackSelectionWindow : public Window { static const NWidgetPart _nested_music_track_selection_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, MTSW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, MTSW_CAPTION), SetDataTip(STR_PLAYLIST_MUSIC_PROGRAM_SELECTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_PLAYLIST_MUSIC_PROGRAM_SELECTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, MTSW_BACKGROUND), NWidget(NWID_HORIZONTAL), SetPIP(2, 4, 2), @@ -425,8 +423,6 @@ static void ShowMusicTrackSelection() } enum MusicWidgets { - MW_CLOSE, - MW_CAPTION, MW_PREV, MW_NEXT, MW_STOP, @@ -639,8 +635,8 @@ struct MusicWindow : public Window { static const NWidgetPart _nested_music_window_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, MW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, MW_CAPTION), SetDataTip(STR_MUSIC_JAZZ_JUKEBOX_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_MUSIC_JAZZ_JUKEBOX_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 4b5d6a296..b2df6cda7 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -26,14 +26,13 @@ /** Widgets used by this window */ enum DownloadStatusWindowWidgets { - NCDSWW_CAPTION, ///< Caption of the window NCDSWW_BACKGROUND, ///< Background NCDSWW_CANCELOK, ///< Cancel/OK button }; /** Nested widgets for the download window. */ static const NWidgetPart _nested_network_content_download_status_window_widgets[] = { - NWidget(WWT_CAPTION, COLOUR_GREY, NCDSWW_CAPTION), SetDataTip(STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PANEL, COLOUR_GREY, NCDSWW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(350, 0), SetMinimalTextLines(3, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 30), NWidget(NWID_HORIZONTAL), @@ -192,8 +191,6 @@ public: /** Widgets of the content list window. */ enum NetworkContentListWindowWidgets { - NCLWW_CLOSE, ///< Close 'X' button - NCLWW_CAPTION, ///< Caption of the window NCLWW_BACKGROUND, ///< Resize button NCLWW_FILTER_CAPT, ///< Caption for the filter editbox @@ -214,8 +211,6 @@ enum NetworkContentListWindowWidgets { NCLWW_CANCEL, ///< 'Cancel' button NCLWW_DOWNLOAD, ///< 'Download' button - NCLWW_RESIZE, ///< Resize button - NCLWW_SEL_ALL_UPDATE, ///< #NWID_SELECTION widget for select all/update buttons. }; @@ -808,8 +803,8 @@ NetworkContentListWindow::GUIContentList::FilterFunction * const NetworkContentL static const NWidgetPart _nested_network_content_list_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NCLWW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NCLWW_CAPTION), SetDataTip(STR_CONTENT_TITLE, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_CONTENT_TITLE, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, NCLWW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 7), SetResize(1, 0), @@ -862,7 +857,7 @@ static const NWidgetPart _nested_network_content_list_widgets[] = { /* Resize button. */ NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_LIGHT_BLUE, NCLWW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_LIGHT_BLUE), EndContainer(), EndContainer(), }; diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 50b43e354..c817d23cc 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -73,8 +73,6 @@ void UpdateNetworkGameWindow(bool unselect) /** Enum for NetworkGameWindow, referring to _network_game_window_widgets */ enum NetworkGameWindowWidgets { - NGWW_CLOSE, ///< Close 'X' button - NGWW_CAPTION, ///< Caption of the window NGWW_MAIN, ///< Main panel NGWW_CONNECTION, ///< Label in front of connection droplist @@ -107,8 +105,6 @@ enum NetworkGameWindowWidgets { NGWW_ADD, ///< 'Add server' button NGWW_START, ///< 'Start server' button NGWW_CANCEL, ///< 'Cancel' button - - NGWW_RESIZE, ///< Resize button }; typedef GUIList GUIGameServerList; @@ -931,8 +927,8 @@ static NWidgetBase *MakeResizableHeader(int *biggest_index) static const NWidgetPart _nested_network_game_widgets[] = { /* TOP */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NGWW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NGWW_CAPTION), SetDataTip(STR_NETWORK_SERVER_LIST_CAPTION, STR_NULL), // XXX Add default caption tooltip! + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_NETWORK_SERVER_LIST_CAPTION, STR_NULL), // XXX Add default caption tooltip! EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, NGWW_MAIN), NWidget(NWID_VERTICAL), SetPIP(10, 7, 0), @@ -996,7 +992,7 @@ static const NWidgetPart _nested_network_game_widgets[] = { EndContainer(), NWidget(NWID_VERTICAL), NWidget(NWID_SPACER), SetFill(0, 1), - NWidget(WWT_RESIZEBOX, COLOUR_LIGHT_BLUE, NGWW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_LIGHT_BLUE), EndContainer(), EndContainer(), EndContainer(), @@ -1029,8 +1025,6 @@ void ShowNetworkGameWindow() /** Enum for NetworkStartServerWindow, referring to _network_start_server_window_widgets */ enum NetworkStartServerWidgets { - NSSW_CLOSE, ///< Close 'X' button - NSSW_CAPTION, NSSW_BACKGROUND, NSSW_GAMENAME_LABEL, NSSW_GAMENAME, ///< Background for editbox to set game name @@ -1173,7 +1167,6 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { { this->field = widget; switch (widget) { - case NSSW_CLOSE: // Close 'X' case NSSW_CANCEL: // Cancel button ShowNetworkGameWindow(); break; @@ -1346,8 +1339,8 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { static const NWidgetPart _nested_network_start_server_window_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NSSW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NSSW_CAPTION), SetDataTip(STR_NETWORK_START_SERVER_CAPTION, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_NETWORK_START_SERVER_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, NSSW_BACKGROUND), NWidget(NWID_HORIZONTAL), SetPIP(10, 8, 10), @@ -1447,8 +1440,6 @@ static void ShowNetworkStartServerWindow() /** Enum for NetworkLobbyWindow, referring to _network_lobby_window_widgets */ enum NetworkLobbyWindowWidgets { - NLWW_CLOSE, ///< Close 'X' button - NLWW_CAPTION, ///< Titlebar NLWW_BACKGROUND, ///< Background panel NLWW_TEXT, ///< Heading text NLWW_HEADER, ///< Header above list of companies @@ -1639,7 +1630,6 @@ struct NetworkLobbyWindow : public Window { virtual void OnClick(Point pt, int widget) { switch (widget) { - case NLWW_CLOSE: // Close 'X' case NLWW_CANCEL: // Cancel button ShowNetworkGameWindow(); break; @@ -1694,8 +1684,8 @@ struct NetworkLobbyWindow : public Window { static const NWidgetPart _nested_network_lobby_window_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NLWW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NLWW_CAPTION), SetDataTip(STR_NETWORK_GAME_LOBBY_CAPTION, STR_NULL), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_NETWORK_GAME_LOBBY_CAPTION, STR_NULL), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, NLWW_BACKGROUND), NWidget(WWT_TEXT, COLOUR_LIGHT_BLUE, NLWW_TEXT), SetDataTip(STR_NETWORK_GAME_LOBBY_PREPARE_TO_JOIN, STR_NULL), SetResize(1, 0), SetPadding(10, 10, 0, 10), @@ -1975,17 +1965,14 @@ static void PopupClientList(int client_no, int x, int y) /** Widget numbers of the client list window. */ enum ClientListWidgets { - CLW_CLOSE, - CLW_CAPTION, - CLW_STICKY, CLW_PANEL, }; static const NWidgetPart _nested_client_list_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CLW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, CLW_CAPTION), SetDataTip(STR_NETWORK_COMPANY_LIST_CLIENT_LIST, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, CLW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_NETWORK_COMPANY_LIST_CLIENT_LIST, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CLW_PANEL), SetMinimalSize(250, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM), SetResize(1, 1), EndContainer(), }; @@ -2168,7 +2155,6 @@ uint32 _network_join_bytes_total; /** Widgets used for the join status window. */ enum NetworkJoinStatusWidgets { - NJSW_CAPTION, ///< Caption of the window NJSW_BACKGROUND, ///< Background NJSW_CANCELOK, ///< Cancel/OK button }; @@ -2260,8 +2246,8 @@ struct NetworkJoinStatusWindow : Window { }; static const NWidgetPart _nested_network_join_status_window_widgets[] = { - NWidget(WWT_CAPTION, COLOUR_GREY, NJSW_CAPTION), SetDataTip(STR_NETWORK_CONNECTING_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_PANEL, COLOUR_GREY, -1), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_NETWORK_CONNECTING_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EMPTY, COLOUR_GREY, NJSW_BACKGROUND), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(75, 0), SetFill(1, 0), @@ -2288,8 +2274,6 @@ void ShowJoinStatusWindow() /** Enum for NetworkGameWindow, referring to _network_game_window_widgets */ enum NetworkCompanyPasswordWindowWidgets { - NCPWW_CLOSE, ///< Close 'X' button - NCPWW_CAPTION, ///< Caption of the whole window NCPWW_BACKGROUND, ///< The background of the interface NCPWW_LABEL, ///< Label in front of the password field NCPWW_PASSWORD, ///< Input field for the password @@ -2375,8 +2359,8 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow { static const NWidgetPart _nested_network_company_password_window_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, NCPWW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_GREY, NCPWW_CAPTION), SetDataTip(STR_COMPANY_PASSWORD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_COMPANY_PASSWORD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, NCPWW_BACKGROUND), NWidget(NWID_VERTICAL), SetPIP(5, 5, 5), diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index bab8e11e4..22c013a8b 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -120,8 +120,6 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint /** Names of the add a newgrf window widgets. */ enum AddNewGRFWindowWidgets { - ANGRFW_CLOSEBOX = 0, - ANGRFW_CAPTION, ANGRFW_FILTER_PANEL, ANGRFW_FILTER_TITLE, ANGRFW_FILTER, @@ -131,7 +129,6 @@ enum AddNewGRFWindowWidgets { ANGRFW_GRF_INFO, ANGRFW_ADD, ANGRFW_RESCAN, - ANGRFW_RESIZE, }; /** @@ -460,8 +457,8 @@ NewGRFAddWindow::GUIGRFConfigList::FilterFunction * const NewGRFAddWindow::filte static const NWidgetPart _nested_newgrf_add_dlg_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, ANGRFW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, ANGRFW_CAPTION), SetDataTip(STR_NEWGRF_ADD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_NEWGRF_ADD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, ANGRFW_FILTER_PANEL), SetResize(1, 0), NWidget(NWID_HORIZONTAL), SetPadding(WD_TEXTPANEL_TOP, 0, WD_TEXTPANEL_BOTTOM, 0), SetPIP(WD_FRAMETEXT_LEFT, WD_FRAMETEXT_RIGHT, WD_FRAMETEXT_RIGHT), @@ -481,7 +478,7 @@ static const NWidgetPart _nested_newgrf_add_dlg_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ANGRFW_ADD), SetMinimalSize(147, 12), SetResize(1, 0), SetDataTip(STR_NEWGRF_ADD_FILE, STR_NEWGRF_ADD_FILE_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ANGRFW_RESCAN), SetMinimalSize(147, 12), SetResize(1, 0), SetDataTip(STR_NEWGRF_ADD_RESCAN_FILES, STR_NEWGRF_ADD_RESCAN_FILES_TOOLTIP), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, ANGRFW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -516,8 +513,6 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed); /** Names of the manage newgrfs window widgets. */ enum ShowNewGRFStateWidgets { - SNGRFS_CLOSEBOX = 0, - SNGRFS_CAPTION, SNGRFS_BACKGROUND1, SNGRFS_PRESET_LIST, SNGRFS_PRESET_SAVE, @@ -534,7 +529,6 @@ enum ShowNewGRFStateWidgets { SNGRFS_TOGGLE_PALETTE, SNGRFS_APPLY_CHANGES, SNGRFS_CONTENT_DOWNLOAD, - SNGRFS_RESIZE, }; /** @@ -1011,8 +1005,8 @@ struct NewGRFWindow : public Window { /* Widget definition of the manage newgrfs window */ static const NWidgetPart _nested_newgrf_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, SNGRFS_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_MAUVE, SNGRFS_CAPTION), SetDataTip(STR_NEWGRF_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_NEWGRF_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_MAUVE, SNGRFS_BACKGROUND1), NWidget(NWID_HORIZONTAL), SetPadding(2, 10, 2, 10), @@ -1043,7 +1037,7 @@ static const NWidgetPart _nested_newgrf_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_MAUVE, SNGRFS_CONTENT_DOWNLOAD), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), - NWidget(WWT_RESIZEBOX, COLOUR_MAUVE, SNGRFS_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), }; diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 268ed0572..5f04ea6de 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -911,12 +911,9 @@ static void DrawNewsString(uint left, uint right, int y, TextColour colour, cons /** Widget numbers of the message history window. */ enum MessageHistoryWidgets { - MHW_CLOSEBOX, - MHW_CAPTION, MHW_STICKYBOX, MHW_BACKGROUND, MHW_SCROLLBAR, - MHW_RESIZEBOX, }; struct MessageHistoryWindow : Window { @@ -1013,9 +1010,9 @@ const int MessageHistoryWindow::bottom_spacing = WD_FRAMERECT_BOTTOM; static const NWidgetPart _nested_message_history[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, MHW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, MHW_CAPTION), SetDataTip(STR_MESSAGE_HISTORY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, MHW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_MESSAGE_HISTORY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -1023,7 +1020,7 @@ static const NWidgetPart _nested_message_history[] = { EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_BROWN, MHW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, MHW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), EndContainer(), }; @@ -1057,8 +1054,6 @@ enum MessageOptionsSpace { /** Message options widget numbers. */ enum MessageOptionWidgets { - WIDGET_NEWSOPT_CLOSEBOX, ///< Close box. - WIDGET_NEWSOPT_CAPTION, ///< Caption. WIDGET_NEWSOPT_BACKGROUND, ///< Background widget. WIDGET_NEWSOPT_LABEL, ///< Top label. WIDGET_NEWSOPT_DROP_SUMMARY, ///< Dropdown that adjusts at once the level for all settings. @@ -1296,8 +1291,8 @@ static NWidgetBase *MakeDescriptionColumn(int *biggest_index) static const NWidgetPart _nested_message_options_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, WIDGET_NEWSOPT_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, WIDGET_NEWSOPT_CAPTION), SetDataTip(STR_NEWS_MESSAGE_OPTIONS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_NEWS_MESSAGE_OPTIONS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, WIDGET_NEWSOPT_BACKGROUND), NWidget(NWID_HORIZONTAL), diff --git a/src/order_gui.cpp b/src/order_gui.cpp index ef75ecd75..788a99c77 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -36,10 +36,8 @@ /** Widget numbers of the order window. */ enum OrderWindowWidgets { - ORDER_WIDGET_CLOSEBOX = 0, ORDER_WIDGET_CAPTION, ORDER_WIDGET_TIMETABLE_VIEW, - ORDER_WIDGET_STICKY, ORDER_WIDGET_ORDER_LIST, ORDER_WIDGET_SCROLLBAR, ORDER_WIDGET_SKIP, @@ -58,7 +56,6 @@ enum OrderWindowWidgets { ORDER_WIDGET_SEL_TOP_RIGHT, ///< #NWID_SELECTION widget for right part of the top row of the 'your train' order window. ORDER_WIDGET_SEL_TOP_ROW, ///< #NWID_SELECTION widget for the top row of the 'your non-trains' order window. ORDER_WIDGET_SHARED_ORDER_LIST, - ORDER_WIDGET_RESIZE, }; /** Order load types that could be given to station orders. */ @@ -1285,10 +1282,10 @@ public: /** Nested widget definition for "your" train orders. */ static const NWidgetPart _nested_orders_train_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, ORDER_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP), - NWidget(WWT_STICKYBOX, COLOUR_GREY, ORDER_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, ORDER_WIDGET_ORDER_LIST), SetMinimalSize(372, 62), SetDataTip(0x0, STR_ORDERS_LIST_TOOLTIP), SetResize(1, 1), EndContainer(), @@ -1334,7 +1331,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = { NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(1, 0), SetDataTip(STR_ORDERS_GO_TO_BUTTON, STR_ORDERS_GO_TO_TOOLTIP), SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, ORDER_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -1348,10 +1345,10 @@ static const WindowDesc _orders_train_desc( /** Nested widget definition for "your" orders (non-train). */ static const NWidgetPart _nested_orders_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, ORDER_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP), - NWidget(WWT_STICKYBOX, COLOUR_GREY, ORDER_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, ORDER_WIDGET_ORDER_LIST), SetMinimalSize(372, 62), SetDataTip(0x0, STR_ORDERS_LIST_TOOLTIP), SetResize(1, 1), EndContainer(), @@ -1398,7 +1395,7 @@ static const NWidgetPart _nested_orders_widgets[] = { SetDataTip(STR_ORDERS_DELETE_BUTTON, STR_ORDERS_DELETE_TOOLTIP), SetResize(1, 0), NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(1, 0), SetDataTip(STR_ORDERS_GO_TO_BUTTON, STR_ORDERS_GO_TO_TOOLTIP), SetResize(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, ORDER_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -1413,16 +1410,16 @@ static const WindowDesc _orders_desc( static const NWidgetPart _nested_other_orders_widgets[] = { NWidget(NWID_VERTICAL), NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, ORDER_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP), - NWidget(WWT_STICKYBOX, COLOUR_GREY, ORDER_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, ORDER_WIDGET_ORDER_LIST), SetMinimalSize(372, 72), SetDataTip(0x0, STR_ORDERS_LIST_TOOLTIP), SetResize(1, 1), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_GREY, ORDER_WIDGET_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, ORDER_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), EndContainer(), diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 51f655421..17999b31d 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -286,9 +286,7 @@ static void PlaceRail_AutoSignals(TileIndex tile) /** Enum referring to the widgets of the build rail toolbar */ enum RailToolbarWidgets { - RTW_CLOSEBOX = 0, RTW_CAPTION, - RTW_STICKY, RTW_SPACER, RTW_BUILD_NS, RTW_BUILD_X, @@ -819,9 +817,9 @@ struct BuildRailToolbarWindow : Window { static const NWidgetPart _nested_build_rail_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, RTW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, RTW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_BUILD_NS), @@ -892,7 +890,7 @@ void ShowBuildRailToolbar(RailType railtype, int button) } _remove_button_clicked = false; - if (w != NULL && button >= RTW_CLOSEBOX) { + if (w != NULL && button >= 0) { _rail_build_button_data[button].click_proc(w); w->UpdateRemoveWidgetStatus(button + RTW_BUILD_NS); } @@ -918,8 +916,6 @@ static void HandleStationPlacement(TileIndex start, TileIndex end) /** Enum referring to the widgets of the rail stations window */ enum BuildRailStationWidgets { - BRSW_CLOSEBOX = 0, - BRSW_CAPTION, BRSW_BACKGROUND, BRSW_ORIENT_LABEL, ///< Text label 'Orientation'. @@ -1355,8 +1351,8 @@ public: static const NWidgetPart _nested_station_builder_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRSW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRSW_CAPTION), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRSW_BACKGROUND), NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_ORIENT_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ORIENTATION, STR_NULL), SetPadding(1, 2, 0, 2), @@ -1408,8 +1404,8 @@ static const NWidgetPart _nested_station_builder_widgets[] = { static const NWidgetPart _nested_newstation_builder_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRSW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRSW_CAPTION), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRSW_BACKGROUND), /* begin newstations gui additions. */ @@ -1495,8 +1491,6 @@ static void ShowStationBuilder(Window *parent) /** Enum referring to the widgets of the signal window */ enum BuildSignalWidgets { - BSW_CLOSEBOX = 0, - BSW_CAPTION, BSW_SEMAPHORE_NORM, BSW_SEMAPHORE_ENTRY, BSW_SEMAPHORE_EXIT, @@ -1648,8 +1642,8 @@ public: /** Nested widget definition of the build signal window */ static const NWidgetPart _nested_signal_builder_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BSW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BSW_CAPTION), SetDataTip(STR_BUILD_SIGNAL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_BUILD_SIGNAL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_VERTICAL, NC_EQUALSIZE), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), @@ -1700,8 +1694,6 @@ static void ShowSignalBuilder(Window *parent) /** Enum referring to the widgets of the build rail depot window */ enum BuildRailDepotWidgets { - BRDW_CLOSEBOX = 0, - BRDW_CAPTION, BRDW_BACKGROUND, BRDW_DEPOT_NE, BRDW_DEPOT_SE, @@ -1748,8 +1740,8 @@ struct BuildRailDepotWindow : public PickerWindowBase { /** Nested widget definition of the build rail depot window */ static const NWidgetPart _nested_build_depot_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRDW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRDW_CAPTION), SetDataTip(STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRDW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 3), @@ -1790,8 +1782,6 @@ static void ShowBuildTrainDepotPicker(Window *parent) /** Enum referring to the widgets of the build NewGRF rail waypoint window */ enum BuildRailWaypointWidgets { - BRWW_CLOSEBOX = 0, - BRWW_CAPTION, BRWW_BACKGROUND, BRWW_WAYPOINT_1, BRWW_WAYPOINT_2, @@ -1862,8 +1852,8 @@ struct BuildRailWaypointWindow : PickerWindowBase { /** Nested widget definition for the build NewGRF rail waypoint window */ static const NWidgetPart _nested_build_waypoint_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRWW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRWW_CAPTION), SetDataTip(STR_WAYPOINT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_WAYPOINT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRWW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 3), diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 060b6c0b6..59f718bdd 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -241,9 +241,6 @@ static void PlaceRoad_TruckStation(TileIndex tile) /** Enum referring to the widgets of the build road toolbar */ enum RoadToolbarWidgets { - RTW_CLOSEBOX = 0, - RTW_CAPTION, - RTW_STICKY, RTW_ROAD_X, RTW_ROAD_Y, RTW_AUTOROAD, @@ -632,9 +629,9 @@ struct BuildRoadToolbarWindow : Window { static const NWidgetPart _nested_build_road_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, RTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, RTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_ROAD_X), @@ -672,9 +669,9 @@ static const WindowDesc _build_road_desc( static const NWidgetPart _nested_build_tramway_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, RTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, RTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_ROAD_X), @@ -720,9 +717,9 @@ void ShowBuildRoadToolbar(RoadType roadtype) static const NWidgetPart _nested_build_road_scen_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, RTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, RTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_ROAD_X), @@ -760,7 +757,6 @@ void ShowBuildRoadScenToolbar() /** Enum referring to the widgets of the build road depot window */ enum BuildRoadDepotWidgets { - BRDW_CLOSEBOX = 0, BRDW_CAPTION, BRDW_BACKGROUND, BRDW_DEPOT_NE, @@ -817,7 +813,7 @@ struct BuildRoadDepotWindow : public PickerWindowBase { static const NWidgetPart _nested_build_road_depot_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRDW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRDW_CAPTION), SetDataTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRDW_BACKGROUND), @@ -859,7 +855,6 @@ static void ShowRoadDepotPicker(Window *parent) /** Enum referring to the widgets of the build road station window */ enum BuildRoadStationWidgets { - BRSW_CLOSEBOX = 0, BRSW_CAPTION, BRSW_BACKGROUND, BRSW_STATION_NE, @@ -978,7 +973,7 @@ struct BuildRoadStationWindow : public PickerWindowBase { /** Widget definition of the build road station window */ static const NWidgetPart _nested_rv_station_picker_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BRSW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRSW_CAPTION), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRSW_BACKGROUND), diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index c67526d13..6c386c9f1 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -103,8 +103,6 @@ static int GetCurRes() /** Widgets of the game options menu */ enum GameOptionsWidgets { - GOW_CLOSEBOX = 0, ///< Close the window - GOW_CAPTION, ///< Caption of the window GOW_BACKGROUND, ///< Background of the window GOW_CURRENCY_FRAME, ///< Frame of the currency dropdown GOW_CURRENCY_DROPDOWN, ///< Currency dropdown @@ -429,8 +427,8 @@ struct GameOptionsWindow : Window { static const NWidgetPart _nested_game_options_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, GOW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, GOW_CAPTION), SetDataTip(STR_GAME_OPTIONS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, GOW_BACKGROUND), SetPIP(6, 6, 10), NWidget(NWID_HORIZONTAL), SetPIP(10, 10, 10), @@ -507,7 +505,6 @@ extern void StartupEconomy(); /* Names of the game difficulty settings window */ enum GameDifficultyWidgets { - GDW_CAPTION, GDW_UPPER_BG, GDW_LVL_EASY, GDW_LVL_MEDIUM, @@ -732,7 +729,7 @@ static NWidgetBase *MakeDifficultyOptionsWidgets(int *biggest_index) /** Widget definition for the game difficulty settings window */ static const NWidgetPart _nested_game_difficulty_widgets[] = { - NWidget(WWT_CAPTION, COLOUR_MAUVE, GDW_CAPTION), SetDataTip(STR_DIFFICULTY_LEVEL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_DIFFICULTY_LEVEL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PANEL, COLOUR_MAUVE, GDW_UPPER_BG), NWidget(NWID_VERTICAL), SetPIP(2, 0, 2), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10), @@ -1437,11 +1434,8 @@ static SettingsPage _settings_main_page = {_settings_main, lengthof(_settings_ma /** Widget numbers of settings window */ enum GameSettingsWidgets { - SETTINGSEL_CLOSEBOX, ///< Close box at top-left - SETTINGSEL_CAPTION, ///< Title bar SETTINGSEL_OPTIONSPANEL, ///< Panel widget containing the option lists SETTINGSEL_SCROLLBAR, ///< Scrollbar - SETTINGSEL_RESIZE, ///< Resize button }; struct GameSettingsWindow : Window { @@ -1649,14 +1643,14 @@ GameSettings *GameSettingsWindow::settings_ptr = NULL; static const NWidgetPart _nested_settings_selection_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_MAUVE, SETTINGSEL_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_MAUVE, SETTINGSEL_CAPTION), SetDataTip(STR_CONFIG_SETTING_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), + NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_CONFIG_SETTING_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_MAUVE, SETTINGSEL_OPTIONSPANEL), SetMinimalSize(400, 174), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_MAUVE, SETTINGSEL_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_MAUVE, SETTINGSEL_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), EndContainer(), }; @@ -1705,8 +1699,6 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic /** Widget numbers of the custom currency window. */ enum CustomCurrencyWidgets { - CUSTCURR_CLOSEBOX, - CUSTCURR_CAPTION, CUSTCURR_BACKGROUND, CUSTCURR_RATE_DOWN, @@ -1906,8 +1898,8 @@ struct CustomCurrencyWindow : Window { static const NWidgetPart _nested_cust_currency_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, CUSTCURR_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, CUSTCURR_CAPTION), SetDataTip(STR_CURRENCY_WINDOW, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), + NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_CURRENCY_WINDOW, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, CUSTCURR_BACKGROUND), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(7, 3, 0), diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index a2a85416d..dbaac6885 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -80,12 +80,9 @@ const Sign *SignList::last_sign = NULL; /** Enum referring to the widgets of the sign list window */ enum SignListWidgets { - SLW_CLOSEBOX = 0, SLW_CAPTION, - SLW_STICKY, SLW_LIST, SLW_SCROLLBAR, - SLW_RESIZE, }; struct SignListWindow : Window, SignList { @@ -201,16 +198,16 @@ struct SignListWindow : Window, SignList { static const NWidgetPart _nested_sign_list_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SLW_CAPTION), SetDataTip(STR_SIGN_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, SLW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, SLW_LIST), SetMinimalSize(WD_FRAMETEXT_LEFT + 16 + MAX_LENGTH_SIGN_NAME_PIXELS + WD_FRAMETEXT_RIGHT, 50), SetResize(1, 10), SetFill(1, 0), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), }; @@ -243,7 +240,6 @@ static bool RenameSign(SignID index, const char *text) /** Widget numbers of the query sign edit window. */ enum QueryEditSignWidgets { - QUERY_EDIT_SIGN_WIDGET_CLOSEBOX, QUERY_EDIT_SIGN_WIDGET_CAPTION, QUERY_EDIT_SIGN_WIDGET_PANEL, QUERY_EDIT_SIGN_WIDGET_TEXT, @@ -397,7 +393,7 @@ struct SignWindow : QueryStringBaseWindow, SignList { static const NWidgetPart _nested_query_sign_edit_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_PANEL), diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 16b8c190c..c1f992e00 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -32,9 +32,7 @@ /** Widget numbers of the small map window. */ enum SmallMapWindowWidgets { - SM_WIDGET_CLOSEBOX, SM_WIDGET_CAPTION, - SM_WIDGET_STICKYBOX, SM_WIDGET_MAP_BORDER, SM_WIDGET_MAP, SM_WIDGET_LEGEND, @@ -51,14 +49,13 @@ enum SmallMapWindowWidgets { SM_WIDGET_SELECTINDUSTRIES, SM_WIDGET_ENABLEINDUSTRIES, SM_WIDGET_DISABLEINDUSTRIES, - SM_WIDGET_RESIZEBOX, }; static const NWidgetPart _nested_smallmap_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, SM_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), NWidget(WWT_CAPTION, COLOUR_BROWN, SM_WIDGET_CAPTION), SetDataTip(STR_SMALLMAP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, SM_WIDGET_STICKYBOX), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), /* Small map display. */ NWidget(WWT_PANEL, COLOUR_BROWN, SM_WIDGET_MAP_BORDER), @@ -99,7 +96,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = { NWidget(NWID_SPACER), SetFill(1, 0), SetResize(1, 0), EndContainer(), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, SM_WIDGET_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), }; diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 121d2031e..6adee7888 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -89,12 +89,9 @@ typedef GUIList GUIStationList; /** Enum for CompanyStations, referring to _company_stations_widgets */ enum StationListWidgets { - SLW_CLOSEBOX = 0, ///< Close window button SLW_CAPTION, ///< Window caption - SLW_STICKY, ///< Sticky button SLW_LIST, ///< The main panel, list of stations SLW_SCROLLBAR, ///< Scrollbar next to the main panel - SLW_RESIZE, ///< Resize button SLW_TRAIN, ///< 'TRAIN' button - list only facilities where is a railroad station SLW_TRUCK, ///< 'TRUCK' button - list only facilities where is a truck stop @@ -681,9 +678,9 @@ static NWidgetBase *CargoWidgets(int *biggest_index) static const NWidgetPart _nested_company_stations_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SLW_CAPTION), SetDataTip(STR_STATION_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, SLW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_TRAIN), SetMinimalSize(14, 11), SetDataTip(STR_TRAIN, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1), @@ -707,7 +704,7 @@ static const NWidgetPart _nested_company_stations_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, SLW_LIST), SetMinimalSize(346, 125), SetResize(1, 10), SetDataTip(0x0, STR_STATION_LIST_TOOLTIP), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), }; @@ -733,9 +730,9 @@ void ShowCompanyStations(CompanyID company) static const NWidgetPart _nested_station_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, SVW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, SVW_CAPTION), SetDataTip(STR_STATION_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, SVW_STICKYBOX), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, SVW_WAITING), SetMinimalSize(237, 52), SetResize(1, 10), EndContainer(), @@ -753,7 +750,7 @@ static const NWidgetPart _nested_station_view_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SVW_ROADVEHS), SetMinimalSize(14, 12), SetFill(0, 1), SetDataTip(STR_LORRY, STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SVW_PLANES), SetMinimalSize(14, 12), SetFill(0, 1), SetDataTip(STR_PLANE, STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SVW_SHIPS), SetMinimalSize(14, 12), SetFill(0, 1), SetDataTip(STR_SHIP, STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, SVW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -1290,23 +1287,21 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join) } enum JoinStationWidgets { - JSW_WIDGET_CLOSEBOX = 0, JSW_WIDGET_CAPTION, JSW_PANEL, JSW_SCROLLBAR, - JSW_RESIZEBOX, }; static const NWidgetPart _nested_select_station_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, JSW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, JSW_WIDGET_CAPTION), SetDataTip(STR_JOIN_STATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, JSW_PANEL), SetResize(1, 0), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_DARK_GREEN, JSW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN, JSW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN), EndContainer(), EndContainer(), }; diff --git a/src/station_gui.h b/src/station_gui.h index b0bb17e76..55fb173c2 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -17,22 +17,19 @@ /** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */ enum StationViewWidgets { - SVW_CLOSEBOX = 0, ///< Close 'X' button - SVW_CAPTION = 1, ///< Caption of the window - SVW_STICKYBOX = 2, ///< Sticky button - SVW_WAITING = 3, ///< List of waiting cargo - SVW_SCROLLBAR = 4, ///< Scrollbar - SVW_ACCEPTLIST = 5, ///< List of accepted cargos - SVW_RATINGLIST = 5, ///< Ratings of cargos - SVW_LOCATION = 6, ///< 'Location' button - SVW_RATINGS = 7, ///< 'Ratings' button - SVW_ACCEPTS = 7, ///< 'Accepts' button - SVW_RENAME = 8, ///< 'Rename' button - SVW_TRAINS = 9, ///< List of scheduled trains button + SVW_CAPTION = 0, ///< Caption of the window + SVW_WAITING = 1, ///< List of waiting cargo + SVW_SCROLLBAR = 2, ///< Scrollbar + SVW_ACCEPTLIST = 3, ///< List of accepted cargos + SVW_RATINGLIST = 3, ///< Ratings of cargos + SVW_LOCATION = 4, ///< 'Location' button + SVW_RATINGS = 5, ///< 'Ratings' button + SVW_ACCEPTS = 5, ///< 'Accepts' button + SVW_RENAME = 6, ///< 'Rename' button + SVW_TRAINS = 7, ///< List of scheduled trains button SVW_ROADVEHS, ///< List of scheduled road vehs button SVW_PLANES, ///< List of scheduled planes button SVW_SHIPS, ///< List of scheduled ships button - SVW_RESIZE, ///< Resize button }; enum StationCoverageType { diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index acec347ab..f8c66fa3c 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -26,12 +26,8 @@ /** Widget numbers for the subsidy list window. */ enum SubsidyListWidgets { - SLW_CLOSEBOX, - SLW_CAPTION, - SLW_STICKYBOX, SLW_PANEL, SLW_SCROLLBAR, - SLW_RESIZEBOX, }; struct SubsidyListWindow : Window { @@ -232,15 +228,15 @@ struct SubsidyListWindow : Window { static const NWidgetPart _nested_subsidies_list_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, SLW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, SLW_CAPTION), SetDataTip(STR_SUBSIDIES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, SLW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_SUBSIDIES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_BROWN, SLW_PANEL), SetDataTip(0x0, STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER), SetResize(1, 1), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_BROWN, SLW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, SLW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), EndContainer(), }; diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 9b977954c..d4bf0d9a2 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -191,9 +191,6 @@ static void PlaceProc_LevelLand(TileIndex tile) /** Enum referring to the widgets of the terraform toolbar */ enum TerraformToolbarWidgets { - TTW_CLOSEBOX = 0, ///< Close window button - TTW_CAPTION, ///< Window caption - TTW_STICKY, ///< Sticky window button TTW_SEPERATOR, ///< Thin seperator line between level land button and demolish button TTW_BUTTONS_START, ///< Start of pushable buttons TTW_LOWER_LAND = TTW_BUTTONS_START, ///< Lower land button @@ -315,9 +312,9 @@ struct TerraformToolbarWindow : Window { static const NWidgetPart _nested_terraform_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, TTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, TTW_CAPTION), SetDataTip(STR_LANDSCAPING_TOOLBAR, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, TTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_LANDSCAPING_TOOLBAR, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_LOWER_LAND), SetMinimalSize(22,22), @@ -493,10 +490,7 @@ static const int8 _multi_terraform_coords[][2] = { /** Enum referring to the widgets of the editor terraform toolbar */ enum EditorTerraformToolbarWidgets { ETTW_START = 0, ///< Used for iterations - ETTW_CLOSEBOX = ETTW_START, ///< Close window button - ETTW_CAPTION, ///< Window caption - ETTW_STICKY, ///< Sticky window button - ETTW_BACKGROUND, ///< Background of the lower part of the window + ETTW_BACKGROUND = ETTW_START, ///< Background of the lower part of the window ETTW_DOTS, ///< Invisible widget for rendering the terraform size on. ETTW_BUTTONS_START, ///< Start of pushable buttons ETTW_DEMOLISH = ETTW_BUTTONS_START, ///< Demolish aka dynamite button @@ -515,9 +509,9 @@ enum EditorTerraformToolbarWidgets { static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, ETTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, ETTW_CAPTION), SetDataTip(STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, ETTW_STICKY), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, ETTW_BACKGROUND), NWidget(NWID_HORIZONTAL), SetPadding(2, 2, 7, 2), diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 8b4ec2334..5a9dfafe8 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -24,10 +24,8 @@ #include "table/strings.h" enum TimetableViewWindowWidgets { - TTV_WIDGET_CLOSEBOX = 0, TTV_CAPTION, TTV_ORDER_VIEW, - TTV_STICKY, TTV_TIMETABLE_PANEL, TTV_SCROLLBAR, TTV_SUMMARY_PANEL, @@ -36,7 +34,6 @@ enum TimetableViewWindowWidgets { TTV_RESET_LATENESS, TTV_AUTOFILL, TTV_EMPTY, - TTV_RESIZE, }; /** @@ -359,10 +356,10 @@ struct TimetableWindow : Window { static const NWidgetPart _nested_timetable_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, TTV_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, TTV_CAPTION), SetDataTip(STR_TIMETABLE_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, TTV_ORDER_VIEW), SetMinimalSize(61, 14), SetDataTip( STR_TIMETABLE_ORDER_VIEW, STR_TIMETABLE_ORDER_VIEW_TOOLTIP), - NWidget(WWT_STICKYBOX, COLOUR_GREY, TTV_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, TTV_TIMETABLE_PANEL), SetMinimalSize(388, 82), SetResize(1, 10), SetDataTip(STR_NULL, STR_TIMETABLE_TOOLTIP), EndContainer(), @@ -375,7 +372,7 @@ static const NWidgetPart _nested_timetable_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, TTV_RESET_LATENESS), SetMinimalSize(118, 12), SetDataTip(STR_TIMETABLE_RESET_LATENESS, STR_TIMETABLE_RESET_LATENESS_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, TTV_AUTOFILL), SetMinimalSize(50, 12), SetDataTip(STR_TIMETABLE_AUTOFILL, STR_TIMETABLE_AUTOFILL_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY, TTV_EMPTY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX,COLOUR_GREY, TTV_RESIZE), + NWidget(WWT_RESIZEBOX,COLOUR_GREY), EndContainer(), }; diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 9cf0c9193..8ea2a3839 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -41,19 +41,17 @@ typedef GUIList GUITownList; /** Widget numbers of the town authority window. */ enum TownAuthorityWidgets { - TWA_CLOSEBOX, TWA_CAPTION, TWA_RATING_INFO, ///< Overview with ratings for each company. TWA_COMMAND_LIST, ///< List of commands for the player. TWA_SCROLLBAR, TWA_ACTION_INFO, ///< Additional information about the action. TWA_EXECUTE, ///< Do-it button. - TWA_RESIZE, ///< Resize the damn window }; static const NWidgetPart _nested_town_authority_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, TWA_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), NWidget(WWT_CAPTION, COLOUR_BROWN, TWA_CAPTION), SetDataTip(STR_LOCAL_AUTHORITY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, TWA_RATING_INFO), SetMinimalSize(317, 92), SetResize(1, 1), EndContainer(), @@ -64,7 +62,7 @@ static const NWidgetPart _nested_town_authority_widgets[] = { NWidget(WWT_PANEL, COLOUR_BROWN, TWA_ACTION_INFO), SetMinimalSize(317, 52), SetResize(1, 0), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TWA_EXECUTE), SetMinimalSize(317, 12), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_LOCAL_AUTHORITY_DO_IT_BUTTON, STR_LOCAL_AUTHORITY_DO_IT_TOOLTIP), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TWA_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer() }; @@ -297,9 +295,7 @@ static void ShowTownAuthorityWindow(uint town) /** Widget numbers of the town view window. */ enum TownViewWidgets { - TVW_CLOSEBOX, TVW_CAPTION, - TVW_STICKY, TVW_VIEWPORTPANEL, TVW_VIEWPORTINSET, TVW_VIEWPORT, @@ -309,7 +305,6 @@ enum TownViewWidgets { TVW_CHANGENAME, TVW_EXPAND, TVW_DELETE, - TVW_RESIZE, }; /* Town view window. */ @@ -526,9 +521,9 @@ public: static const NWidgetPart _nested_town_game_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, TVW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, TVW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, TVW_VIEWPORTPANEL), NWidget(WWT_INSET, COLOUR_BROWN, TVW_VIEWPORTINSET), SetPadding(2, 2, 2, 2), @@ -542,7 +537,7 @@ static const NWidgetPart _nested_town_game_view_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_SHOWAUTHORITY), SetMinimalSize(80, 12), SetFill(1, 1), SetResize(1, 0), SetDataTip(STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON, STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_CHANGENAME), SetMinimalSize(80, 12), SetFill(1, 1), SetResize(1, 0), SetDataTip(STR_BUTTON_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TVW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), }; @@ -555,10 +550,10 @@ static const WindowDesc _town_game_view_desc( static const NWidgetPart _nested_town_editor_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, TVW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_CHANGENAME), SetMinimalSize(76, 14), SetDataTip(STR_BUTTON_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, TVW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, TVW_VIEWPORTPANEL), NWidget(WWT_INSET, COLOUR_BROWN, TVW_VIEWPORTINSET), SetPadding(2, 2, 2, 2), @@ -572,7 +567,7 @@ static const NWidgetPart _nested_town_editor_view_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_EXPAND), SetMinimalSize(80, 12), SetFill(1, 1), SetResize(1, 0), SetDataTip(STR_TOWN_VIEW_EXPAND_BUTTON, STR_TOWN_VIEW_EXPAND_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_DELETE), SetMinimalSize(80, 12), SetFill(1, 1), SetResize(1, 0), SetDataTip(STR_TOWN_VIEW_DELETE_BUTTON, STR_TOWN_VIEW_DELETE_TOOLTIP), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TVW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), }; @@ -594,23 +589,19 @@ void ShowTownViewWindow(TownID town) /** Widget numbers of town directory window. */ enum TownDirectoryWidgets { - TDW_CLOSEBOX, - TDW_CAPTION, - TDW_STICKYBOX, TDW_SORTNAME, TDW_SORTPOPULATION, TDW_CENTERTOWN, TDW_SCROLLBAR, TDW_BOTTOM_PANEL, TDW_BOTTOM_TEXT, - TDW_RESIZEBOX, }; static const NWidgetPart _nested_town_directory_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_BROWN, TDW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_BROWN, TDW_CAPTION), SetDataTip(STR_TOWN_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_BROWN, TDW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_BROWN), + NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_TOWN_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_BROWN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_VERTICAL), @@ -626,7 +617,7 @@ static const NWidgetPart _nested_town_directory_widgets[] = { EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_BROWN, TDW_SCROLLBAR), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TDW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN), EndContainer(), EndContainer(), }; @@ -894,9 +885,6 @@ void CcFoundRandomTown(bool success, TileIndex tile, uint32 p1, uint32 p2) /** Widget numbers of town scenario editor window. */ enum TownScenarioEditorWidgets { - TSEW_CLOSEBOX, - TSEW_CAPTION, - TSEW_STICKYBOX, TSEW_BACKGROUND, TSEW_NEWTOWN, TSEW_RANDOMTOWN, @@ -920,9 +908,9 @@ enum TownScenarioEditorWidgets { static const NWidgetPart _nested_found_town_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, TSEW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, TSEW_CAPTION), SetDataTip(STR_FOUND_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, TSEW_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FOUND_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), /* Construct new town(s) buttons. */ NWidget(WWT_PANEL, COLOUR_DARK_GREEN, TSEW_BACKGROUND), diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index 1202cbc20..eb9caac23 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -24,10 +24,6 @@ TransparencyOptionBits _invisibility_opt; /** Widget numbers of the transparency window. */ enum TransparencyToolbarWidgets { - TTW_WIDGET_CLOSEBOX, ///< Closebox. - TTW_WIDGET_CAPTION, ///< Titlebar caption. - TTW_WIDGET_STICKYBOX, ///< Stickybox. - /* Button row. */ TTW_WIDGET_BEGIN, ///< First toggle button. TTW_WIDGET_SIGNS = TTW_WIDGET_BEGIN, ///< Signs background transparency toggle button. @@ -131,9 +127,9 @@ public: static const NWidgetPart _nested_transparency_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, TTW_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, TTW_WIDGET_CAPTION), SetDataTip(STR_TRANSPARENCY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN, TTW_WIDGET_STICKYBOX), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TRANSPARENCY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_SIGNS), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SIGN, STR_TRANSPARENT_SIGNS_TOOLTIP), diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index c93b44144..213532c94 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -27,8 +27,6 @@ void PlaceTreesRandomly(); /** Widget definitions for the build trees window. */ enum BuildTreesWidgets { - BTW_CLOSE, - BTW_CAPTION, BTW_BACKGROUND, BTW_TYPE_11, BTW_TYPE_12, @@ -167,8 +165,8 @@ public: static const NWidgetPart _nested_build_trees_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, BTW_CLOSE), - NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BTW_CAPTION), SetDataTip(STR_PLANT_TREE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), + NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_PLANT_TREE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BTW_BACKGROUND), NWidget(NWID_SPACER), SetMinimalSize(0, 2), diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 9482f6428..f171dd40e 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -285,14 +285,12 @@ static void DrawVehicleRefitWindow(const RefitList *list, int sel, uint pos, uin /** Widget numbers of the vehicle refit window. */ enum VehicleRefitWidgets { - VRW_CLOSEBOX, VRW_CAPTION, VRW_SELECTHEADER, VRW_MATRIX, VRW_SCROLLBAR, VRW_INFOPANEL, VRW_REFITBUTTON, - VRW_RESIZEBOX, }; /** Refit cargo window. */ @@ -430,7 +428,7 @@ struct RefitWindow : public Window { static const NWidgetPart _nested_vehicle_refit_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, VRW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VRW_CAPTION), SetDataTip(STR_REFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_TEXTBTN, COLOUR_GREY, VRW_SELECTHEADER), SetDataTip(STR_REFIT_TITLE, STR_NULL), SetResize(1, 0), @@ -442,7 +440,7 @@ static const NWidgetPart _nested_vehicle_refit_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, VRW_INFOPANEL), SetMinimalTextLines(2, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM), SetResize(1, 0), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VRW_REFITBUTTON), SetFill(1, 0), SetResize(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, VRW_RESIZEBOX), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -704,9 +702,7 @@ void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index) } enum VehicleListWindowWidgets { - VLW_WIDGET_CLOSEBOX = 0, VLW_WIDGET_CAPTION, - VLW_WIDGET_STICKY, VLW_WIDGET_SORT_ORDER, VLW_WIDGET_SORT_BY_PULLDOWN, VLW_WIDGET_EMPTY_TOP_RIGHT, @@ -719,14 +715,13 @@ enum VehicleListWindowWidgets { VLW_WIDGET_STOP_ALL, VLW_WIDGET_START_ALL, VLW_WIDGET_EMPTY_BOTTOM_RIGHT, - VLW_WIDGET_RESIZE, }; static const NWidgetPart _nested_vehicle_list[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, VLW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VLW_WIDGET_CAPTION), - NWidget(WWT_STICKYBOX, COLOUR_GREY, VLW_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -757,7 +752,7 @@ static const NWidgetPart _nested_vehicle_list[] = { /* Widget to be shown for other companies hiding the previous 5 widgets. */ NWidget(WWT_PANEL, COLOUR_GREY, VLW_WIDGET_OTHER_COMPANY_FILLER), SetFill(1, 1), SetResize(1, 0), EndContainer(), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, VLW_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -1254,10 +1249,8 @@ void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, TileInde /** Constants of vehicle details widget indices */ enum VehicleDetailsWindowWidgets { - VLD_WIDGET_CLOSEBOX = 0, VLD_WIDGET_CAPTION, VLD_WIDGET_RENAME_VEHICLE, - VLD_WIDGET_STICKY, VLD_WIDGET_TOP_DETAILS, VLD_WIDGET_INCREASE_SERVICING_INTERVAL, VLD_WIDGET_DECREASE_SERVICING_INTERVAL, @@ -1269,7 +1262,6 @@ enum VehicleDetailsWindowWidgets { VLD_WIDGET_DETAILS_TRAIN_VEHICLES, VLD_WIDGET_DETAILS_CAPACITY_OF_EACH, VLD_WIDGET_DETAILS_TOTAL_CARGO, - VLD_WIDGET_RESIZE, }; assert_compile(VLD_WIDGET_DETAILS_CARGO_CARRIED == VLD_WIDGET_DETAILS_CARGO_CARRIED + TDW_TAB_CARGO ); @@ -1280,10 +1272,10 @@ assert_compile(VLD_WIDGET_DETAILS_TOTAL_CARGO == VLD_WIDGET_DETAILS_CARGO_C /** Vehicle details widgets (other than train). */ static const NWidgetPart _nested_nontrain_vehicle_details_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, VLD_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VLD_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLD_WIDGET_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */), - NWidget(WWT_STICKYBOX, COLOUR_GREY, VLD_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_TOP_DETAILS), SetMinimalSize(405, 42), SetResize(1, 0), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_MIDDLE_DETAILS), SetMinimalSize(405, 45), SetResize(1, 0), EndContainer(), @@ -1293,17 +1285,17 @@ static const NWidgetPart _nested_nontrain_vehicle_details_widgets[] = { NWidget(NWID_BUTTON_ARROW, COLOUR_GREY, VLD_WIDGET_INCREASE_SERVICING_INTERVAL), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_SERVICING_INTERVAL), SetFill(1, 1), SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, VLD_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; /** Train details widgets. */ static const NWidgetPart _nested_train_vehicle_details_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, VLD_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VLD_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLD_WIDGET_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */), - NWidget(WWT_STICKYBOX, COLOUR_GREY, VLD_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_TOP_DETAILS), SetResize(1, 0), SetMinimalSize(405, 42), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -1326,7 +1318,7 @@ static const NWidgetPart _nested_train_vehicle_details_widgets[] = { SetDataTip(STR_VEHICLE_DETAIL_TAB_CAPACITIES, STR_VEHICLE_DETAILS_TRAIN_CAPACITIES_TOOLTIP), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLD_WIDGET_DETAILS_TOTAL_CARGO), SetMinimalSize(99, 12), SetDataTip(STR_VEHICLE_DETAIL_TAB_TOTAL_CARGO, STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TOOLTIP), SetFill(1, 0), SetResize(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, VLD_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; @@ -1634,9 +1626,9 @@ static void ShowVehicleDetailsWindow(const Vehicle *v) /** Vehicle view widgets. */ static const NWidgetPart _nested_vehicle_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, VVW_WIDGET_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VVW_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, VVW_WIDGET_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, VVW_WIDGET_PANEL), @@ -1665,7 +1657,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHBTN, COLOUR_GREY, VVW_WIDGET_START_STOP_VEH), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM), SetResize(1, 0), SetFill(1, 0), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, VVW_WIDGET_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index 835a199c6..fb82d1d3b 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -23,9 +23,7 @@ void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *pare /** Constants of vehicle view widget indices */ enum VehicleViewWindowWidgets { - VVW_WIDGET_CLOSEBOX = 0, VVW_WIDGET_CAPTION, - VVW_WIDGET_STICKY, VVW_WIDGET_PANEL, VVW_WIDGET_INSET, VVW_WIDGET_VIEWPORT, ///< Viewport widget. @@ -39,7 +37,6 @@ enum VehicleViewWindowWidgets { VVW_WIDGET_EMPTY_BOTTOM_RIGHT, VVW_WIDGET_SELECT_DEPOT_CLONE, ///< Selection widget between 'goto depot', and 'clone vehicle' buttons. VVW_WIDGET_SELECT_REFIT_TURN, ///< Selection widget between 'refit' and 'turn around' buttons. - VVW_WIDGET_RESIZE, VVW_WIDGET_TURN_AROUND, VVW_WIDGET_FORCE_PROCEED, }; diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index 152af06f8..91772e1e0 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -23,9 +23,7 @@ /** Widget numbers of the extra viewport window. */ enum ExtraViewportWindowWidgets { - EVW_CLOSE, EVW_CAPTION, - EVW_STICKY, EVW_BACKGROUND, EVW_VIEWPORT, EVW_ZOOMIN, @@ -33,15 +31,14 @@ enum ExtraViewportWindowWidgets { EVW_MAIN_TO_VIEW, EVW_VIEW_TO_MAIN, EVW_SPACER, - EVW_RESIZE, }; /* Extra ViewPort Window Stuff */ static const NWidgetPart _nested_extra_view_port_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, EVW_CLOSE), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, EVW_CAPTION), SetDataTip(STR_EXTRA_VIEW_PORT_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, EVW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, EVW_BACKGROUND), NWidget(NWID_VIEWPORT, INVALID_COLOUR, EVW_VIEWPORT), SetPadding(2, 2, 2, 2), SetResize(1, 1), SetFill(1, 1), @@ -58,7 +55,7 @@ static const NWidgetPart _nested_extra_view_port_widgets[] = { EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, EVW_SPACER), SetFill(1, 1), SetResize(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_GREY, EVW_RESIZE), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index c25759aa0..e935113b3 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -26,9 +26,7 @@ /** Widget definitions for the waypoint window. */ enum WaypointWindowWidgets { - WAYPVW_CLOSEBOX = 0, WAYPVW_CAPTION, - WAYPVW_STICKY, WAYPVW_VIEWPORTPANEL, WAYPVW_SPACER, WAYPVW_VIEWPORT, @@ -125,9 +123,9 @@ public: static const NWidgetPart _nested_waypoint_view_widgets[] = { NWidget(NWID_HORIZONTAL), - NWidget(WWT_CLOSEBOX, COLOUR_GREY, WAYPVW_CLOSEBOX), + NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, WAYPVW_CAPTION), SetDataTip(STR_WAYPOINT_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_STICKYBOX, COLOUR_GREY, WAYPVW_STICKY), + NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, WAYPVW_VIEWPORTPANEL), NWidget(WWT_INSET, COLOUR_GREY, WAYPVW_SPACER), SetPadding(2, 2, 2, 2), -- cgit v1.2.3-70-g09d2