diff options
author | rubidium <rubidium@openttd.org> | 2009-11-24 21:13:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-24 21:13:36 +0000 |
commit | 8d6e323ef80fcb49c4fc8417564d1e2ef7797a73 (patch) | |
tree | fdd555748c6ddc5afd2181becd1006e6c8375ced /src | |
parent | 3f0e1c9091bc13f82bcab6874f35d62f46987de5 (diff) | |
download | openttd-8d6e323ef80fcb49c4fc8417564d1e2ef7797a73.tar.xz |
(svn r18280) -Codechange: remove widget indices that are not needed for custom drawing/handling input
Diffstat (limited to 'src')
-rw-r--r-- | src/airport_gui.cpp | 35 | ||||
-rw-r--r-- | src/build_vehicle_gui.cpp | 3 | ||||
-rw-r--r-- | src/company_gui.cpp | 20 | ||||
-rw-r--r-- | src/dock_gui.cpp | 8 | ||||
-rw-r--r-- | src/engine_gui.cpp | 3 | ||||
-rw-r--r-- | src/genworld_gui.cpp | 99 | ||||
-rw-r--r-- | src/graph_gui.cpp | 4 | ||||
-rw-r--r-- | src/group_gui.cpp | 15 | ||||
-rw-r--r-- | src/industry_gui.cpp | 16 | ||||
-rw-r--r-- | src/intro_gui.cpp | 4 | ||||
-rw-r--r-- | src/misc_gui.cpp | 26 | ||||
-rw-r--r-- | src/music_gui.cpp | 6 | ||||
-rw-r--r-- | src/newgrf_gui.cpp | 15 | ||||
-rw-r--r-- | src/osk_gui.cpp | 6 | ||||
-rw-r--r-- | src/rail_gui.cpp | 37 | ||||
-rw-r--r-- | src/road_gui.cpp | 3 | ||||
-rw-r--r-- | src/settings_gui.cpp | 46 | ||||
-rw-r--r-- | src/signs_gui.cpp | 6 | ||||
-rw-r--r-- | src/smallmap_gui.cpp | 3 | ||||
-rw-r--r-- | src/station_gui.cpp | 9 | ||||
-rw-r--r-- | src/terraform_gui.cpp | 8 | ||||
-rw-r--r-- | src/timetable_gui.cpp | 3 | ||||
-rw-r--r-- | src/town_gui.cpp | 10 | ||||
-rw-r--r-- | src/transparency_gui.cpp | 2 | ||||
-rw-r--r-- | src/tree_gui.cpp | 3 | ||||
-rw-r--r-- | src/vehicle_gui.cpp | 15 | ||||
-rw-r--r-- | src/vehicle_gui.h | 3 | ||||
-rw-r--r-- | src/viewport_gui.cpp | 6 | ||||
-rw-r--r-- | src/waypoint_gui.cpp | 21 |
29 files changed, 159 insertions, 276 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 115127d60..b2f28976b 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -52,7 +52,6 @@ static void PlaceAirport(TileIndex tile) enum { ATW_AIRPORT, ATW_DEMOLISH, - ATW_SPACER, }; @@ -142,7 +141,7 @@ static const NWidgetPart _nested_air_toolbar_widgets[] = { 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), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, ATW_SPACER), SetMinimalSize(4, 22), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), SetFill(1, 1), EndContainer(), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ATW_DEMOLISH), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC), EndContainer(), }; @@ -164,16 +163,6 @@ void ShowBuildAirToolbar() /** Airport widgets in the airport picker window. */ enum AirportPickerWidgets { - /* Panels and labels. */ - BAW_SMALL_AIRPORTS_PANEL, - BAW_SMALL_AIRPORTS_LABEL, - BAW_LARGE_AIRPORTS_PANEL, - BAW_LARGE_AIRPORTS_LABEL, - BAW_HUB_AIRPORTS_PANEL, - BAW_HUB_AIRPORTS_LABEL, - BAW_HELIPORTS_PANEL, - BAW_HELIPORTS_LABEL, - BAW_BOTTOMPANEL, /* Airport selection buttons. */ BAW_SMALL_AIRPORT, BAW_CITY_AIRPORT, @@ -184,10 +173,10 @@ enum AirportPickerWidgets { BAW_HELIDEPOT, BAW_INTERCONTINENTAL_AIRPORT, BAW_HELISTATION, - /* Coverage. */ + + BAW_BOTTOMPANEL, BAW_BTN_DONTHILIGHT, BAW_BTN_DOHILIGHT, - BAW_COVERAGE_LABEL, BAW_LAST_AIRPORT = BAW_HELISTATION, BAW_AIRPORT_COUNT = BAW_LAST_AIRPORT - BAW_SMALL_AIRPORT + 1, @@ -300,8 +289,8 @@ static const NWidgetPart _nested_build_airport_widgets[] = { 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), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BAW_SMALL_AIRPORTS_LABEL), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_SMALL_AIRPORTS, STR_NULL), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_SMALL_AIRPORTS, STR_NULL), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), NWidget(NWID_VERTICAL), @@ -315,8 +304,8 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), EndContainer(), /* Large airports. */ - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BAW_LARGE_AIRPORTS_PANEL), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BAW_LARGE_AIRPORTS_LABEL), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_LARGE_AIRPORTS, STR_NULL), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_LARGE_AIRPORTS, STR_NULL), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), NWidget(NWID_VERTICAL), @@ -330,8 +319,8 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), EndContainer(), /* Hub airports. */ - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BAW_HUB_AIRPORTS_PANEL), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BAW_HUB_AIRPORTS_LABEL), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_HUB_AIRPORTS, STR_NULL), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_HUB_AIRPORTS, STR_NULL), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), NWidget(NWID_VERTICAL), @@ -345,8 +334,8 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), EndContainer(), /* Heliports. */ - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BAW_HELIPORTS_PANEL), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BAW_HELIPORTS_LABEL), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_HELIPORTS, STR_NULL), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_AIRPORT_HELIPORTS, STR_NULL), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), NWidget(NWID_VERTICAL), @@ -363,7 +352,7 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), /* Bottom panel. */ NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BAW_BOTTOMPANEL), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BAW_COVERAGE_LABEL), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(148, 14), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(14, 0), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 661c6d2d2..e09177f55 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -47,7 +47,6 @@ uint GetEngineListHeight(VehicleType type) enum BuildVehicleWidgets { BUILD_VEHICLE_WIDGET_CAPTION, - BUILD_VEHICLE_WIDGET_LIST_CONTROL, BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING, BUILD_VEHICLE_WIDGET_SORT_DROPDOWN, BUILD_VEHICLE_WIDGET_CARGO_FILTER_DROPDOWN, @@ -65,7 +64,7 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), NWidget(NWID_VERTICAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 48a1778bf..4d615da61 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -124,7 +124,6 @@ static const ExpensesList _expenses_list_types[] = { enum CompanyFinancesWindowWidgets { CFW_CAPTION, ///< Caption of the window CFW_TOGGLE_SIZE, ///< Toggle windows size - CFW_EXPS_PANEL, ///< Panel for expenses CFW_SEL_PANEL, ///< Select panel or nothing CFW_EXPS_CATEGORY, ///< Column for expenses category strings CFW_EXPS_PRICE1, ///< Column for year Y-2 expenses @@ -132,8 +131,6 @@ enum CompanyFinancesWindowWidgets { CFW_EXPS_PRICE3, ///< Column for year Y expenses CFW_TOTAL_PANEL, ///< Panel for totals CFW_SEL_MAXLOAN, ///< Selection of maxloan column - CFW_BALANCE_TITLE, ///< 'Bank balance' title - CFW_LOAN_TITLE, ///< 'Loan' title CFW_BALANCE_VALUE, ///< Bank balance value CFW_LOAN_VALUE, ///< Loan CFW_LOAN_LINE, ///< Line for summing bank balance and loan @@ -237,7 +234,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_SELECTION, INVALID_COLOUR, CFW_SEL_PANEL), - NWidget(WWT_PANEL, COLOUR_GREY, CFW_EXPS_PANEL), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPadding(WD_FRAMERECT_TOP, WD_FRAMERECT_RIGHT, WD_FRAMERECT_BOTTOM, WD_FRAMERECT_LEFT), SetPIP(0, 9, 0), NWidget(WWT_EMPTY, COLOUR_GREY, CFW_EXPS_CATEGORY), SetMinimalSize(120, 0), SetFill(0, 0), NWidget(WWT_EMPTY, COLOUR_GREY, CFW_EXPS_PRICE1), SetMinimalSize(86, 0), SetFill(0, 0), @@ -246,11 +243,11 @@ static const NWidgetPart _nested_company_finances_widgets[] = { EndContainer(), EndContainer(), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, CFW_TOTAL_PANEL), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPadding(WD_FRAMERECT_TOP, WD_FRAMERECT_RIGHT, WD_FRAMERECT_BOTTOM, WD_FRAMERECT_LEFT), NWidget(NWID_VERTICAL), // Vertical column with 'bank balance', 'loan' - NWidget(WWT_TEXT, COLOUR_GREY, CFW_BALANCE_TITLE), SetDataTip(STR_FINANCES_BANK_BALANCE_TITLE, STR_NULL), SetFill(1, 0), - NWidget(WWT_TEXT, COLOUR_GREY, CFW_LOAN_TITLE), SetDataTip(STR_FINANCES_LOAN_TITLE, STR_NULL), SetFill(1, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetDataTip(STR_FINANCES_BANK_BALANCE_TITLE, STR_NULL), SetFill(1, 0), + NWidget(WWT_TEXT, COLOUR_GREY), SetDataTip(STR_FINANCES_LOAN_TITLE, STR_NULL), SetFill(1, 0), NWidget(NWID_SPACER), SetFill(0, 1), EndContainer(), NWidget(NWID_SPACER), SetFill(0, 0), SetMinimalSize(30, 0), @@ -551,7 +548,6 @@ enum SelectCompanyLiveryWindowWidgets { SCLW_WIDGET_CLASS_ROAD, SCLW_WIDGET_CLASS_SHIP, SCLW_WIDGET_CLASS_AIRCRAFT, - SCLW_WIDGET_SPACER_CLASS, SCLW_WIDGET_SPACER_DROPDOWN, SCLW_WIDGET_PRI_COL_DROPDOWN, SCLW_WIDGET_SEC_COL_DROPDOWN, @@ -808,7 +804,7 @@ static const NWidgetPart _nested_select_company_livery_widgets [] = { NWidget(WWT_IMGBTN, COLOUR_GREY, SCLW_WIDGET_CLASS_ROAD), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRUCKLIST, STR_LIVERY_ROAD_VEHICLE_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_GREY, SCLW_WIDGET_CLASS_SHIP), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIPLIST, STR_LIVERY_SHIP_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_GREY, SCLW_WIDGET_CLASS_AIRCRAFT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_AIRPLANESLIST, STR_LIVERY_AIRCRAFT_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_GREY, SCLW_WIDGET_SPACER_CLASS), SetMinimalSize(90, 22), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(90, 22), SetFill(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, SCLW_WIDGET_SPACER_DROPDOWN), SetMinimalSize(150, 12), SetFill(1, 1), EndContainer(), @@ -1432,7 +1428,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_CAPTION, - CW_WIDGET_BACKGROUND, CW_WIDGET_FACE, CW_WIDGET_FACE_TITLE, @@ -1470,7 +1465,7 @@ static const NWidgetPart _nested_company_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPIP(4, 6, 4), NWidget(NWID_VERTICAL), SetPIP(4, 2, 4), NWidget(WWT_EMPTY, INVALID_COLOUR, CW_WIDGET_FACE), SetMinimalSize(91, 120), SetFill(1, 0), @@ -1909,7 +1904,6 @@ void ShowCompany(CompanyID company) /** widget numbers of the #BuyCompanyWindow. */ enum BuyCompanyWidgets { BCW_CAPTION, - BCW_BACKGROUND, BCW_FACE, BCW_QUESTION, BCW_NO, @@ -1989,7 +1983,7 @@ static const NWidgetPart _nested_buy_company_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE), NWidget(NWID_VERTICAL), SetPIP(8, 8, 8), NWidget(NWID_HORIZONTAL), SetPIP(8, 10, 8), NWidget(WWT_EMPTY, INVALID_COLOUR, BCW_FACE), SetFill(0, 1), diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 2731eae27..b6c6ebf98 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -94,7 +94,6 @@ enum DockToolbarWidgets { DTW_BUTTONS_BEGIN, ///< Begin of clickable buttons (except seperating panel) DTW_CANAL = DTW_BUTTONS_BEGIN, ///< Build canal button DTW_LOCK, ///< Build lock button - DTW_SEPERATOR, ///< Seperating panel between lock and demolish DTW_DEMOLISH, ///< Demolish aka dynamite button DTW_DEPOT, ///< Build depot button DTW_STATION, ///< Build station button @@ -155,7 +154,6 @@ typedef void OnButtonClick(Window *w); static OnButtonClick * const _build_docks_button_proc[] = { BuildDocksClick_Canal, BuildDocksClick_Lock, - NULL, BuildDocksClick_Demolish, BuildDocksClick_Depot, BuildDocksClick_Dock, @@ -184,7 +182,7 @@ struct BuildDocksToolbarWindow : Window { virtual void OnClick(Point pt, int widget) { - if (widget >= DTW_BUTTONS_BEGIN && widget != DTW_SEPERATOR) _build_docks_button_proc[widget - DTW_BUTTONS_BEGIN](this); + if (widget >= DTW_BUTTONS_BEGIN) _build_docks_button_proc[widget - DTW_BUTTONS_BEGIN](this); } virtual EventState OnKeyPress(uint16 key, uint16 keycode) @@ -271,7 +269,7 @@ static const NWidgetPart _nested_build_docks_toolbar_widgets[] = { 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), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_LOCK), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUILD_LOCK, STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, DTW_SEPERATOR), SetMinimalSize(5, 22), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(5, 22), SetFill(1, 1), EndContainer(), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_DEMOLISH), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_DEPOT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIP_DEPOT, STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_STATION), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIP_DOCK, STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP), @@ -308,7 +306,7 @@ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = { 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), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_LOCK), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUILD_LOCK, STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, DTW_SEPERATOR), SetMinimalSize(5, 22), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(5, 22), SetFill(1, 1), EndContainer(), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_DEMOLISH), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_RIVER), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUILD_RIVER, STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_BUILD_AQUEDUCT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_AQUEDUCT, STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP), diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index f144a3f61..2104cb277 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -44,7 +44,6 @@ StringID GetEngineCategoryName(EngineID engine) /** Widgets used for the engine preview window */ enum EnginePreviewWidgets { - EPW_BACKGROUND, ///< Background EPW_QUESTION, ///< The container for the question EPW_NO, ///< No button EPW_YES, ///< Yes button @@ -55,7 +54,7 @@ static const NWidgetPart _nested_engine_preview_widgets[] = { 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_PANEL, COLOUR_LIGHT_BLUE), NWidget(WWT_EMPTY, INVALID_COLOUR, EPW_QUESTION), SetMinimalSize(300, 0), SetPadding(8, 8, 8, 8), SetFill(1, 0), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, 10, 85), NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, EPW_NO), SetDataTip(STR_QUIT_NO, STR_NULL), SetFill(1, 0), diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 4f261f947..462d377e4 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -56,64 +56,45 @@ static inline void SetNewLandscapeType(byte landscape) } enum GenerateLandscapeWindowWidgets { - GLAND_BACKGROUND, - GLAND_TEMPERATE, GLAND_ARCTIC, GLAND_TROPICAL, GLAND_TOYLAND, - GLAND_MAPSIZE_X_TEXT, GLAND_MAPSIZE_X_PULLDOWN, - GLAND_MAPSIZE_Y_TEXT, GLAND_MAPSIZE_Y_PULLDOWN, - GLAND_TOWN_TEXT, GLAND_TOWN_PULLDOWN, - GLAND_INDUSTRY_TEXT, GLAND_INDUSTRY_PULLDOWN, - GLAND_RANDOM_TEXT, GLAND_RANDOM_EDITBOX, GLAND_RANDOM_BUTTON, GLAND_GENERATE_BUTTON, - GLAND_START_DATE_TEXT1, GLAND_START_DATE_DOWN, GLAND_START_DATE_TEXT, GLAND_START_DATE_UP, - GLAND_SNOW_LEVEL_TEXT1, GLAND_SNOW_LEVEL_DOWN, GLAND_SNOW_LEVEL_TEXT, GLAND_SNOW_LEVEL_UP, - GLAND_TREE_TEXT, GLAND_TREE_PULLDOWN, - GLAND_LANDSCAPE_TEXT, GLAND_LANDSCAPE_PULLDOWN, GLAND_HEIGHTMAP_NAME_LABEL, GLAND_HEIGHTMAP_NAME_TEXT, GLAND_HEIGHTMAP_NAME_SPACER, GLAND_HEIGHTMAP_SIZE_LABEL, GLAND_HEIGHTMAP_SIZE_TEXT, - GLAND_HEIGHTMAP_ROTATION_TEXT, GLAND_HEIGHTMAP_ROTATION_PULLDOWN, - GLAND_TERRAIN_TEXT, GLAND_TERRAIN_PULLDOWN, - GLAND_WATER_TEXT, GLAND_WATER_PULLDOWN, - GLAND_SMOOTHNESS_TEXT, GLAND_SMOOTHNESS_PULLDOWN, GLAND_BORDER_TYPES, GLAND_BORDERS_RANDOM, - GLAND_WATER_NW_TEXT, - GLAND_WATER_NE_TEXT, - GLAND_WATER_SE_TEXT, - GLAND_WATER_SW_TEXT, GLAND_WATER_NW, GLAND_WATER_NE, GLAND_WATER_SE, @@ -125,7 +106,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { 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(WWT_PANEL, COLOUR_BROWN), NWidget(NWID_SPACER), SetMinimalSize(0, 10), /* Landscape selection. */ NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 10), @@ -144,13 +125,13 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), /* Left column with labels. */ NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_X_TEXT), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_LANDSCAPE_TEXT), SetDataTip(STR_MAPGEN_LAND_GENERATOR, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TOWN_TEXT), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TERRAIN_TEXT), SetDataTip(STR_MAPGEN_TERRAIN_TYPE, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_RANDOM_TEXT), SetDataTip(STR_MAPGEN_RANDOM_SEED, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_TEXT), SetDataTip(STR_MAPGEN_QUANTITY_OF_SEA_LAKES, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TREE_TEXT), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_LAND_GENERATOR, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TERRAIN_TYPE, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_RANDOM_SEED, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_QUANTITY_OF_SEA_LAKES, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1), NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_BORDER_TYPES), SetDataTip(STR_MAPGEN_BORDER_TYPE, STR_NULL), SetFill(1, 1), EndContainer(), /* Widgets at the right of the labels. */ @@ -158,7 +139,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { /* Mapsize X * Y. */ NWidget(NWID_HORIZONTAL), SetPIP(0, 4, 0), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), SetFill(1, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_Y_TEXT), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), SetFill(1, 0), EndContainer(), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_LANDSCAPE_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0), @@ -173,10 +154,10 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(NWID_VERTICAL), SetPIP(0, 4, 0), NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_START_DATE_TEXT1), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT1), SetDataTip(STR_MAPGEN_SNOW_LINE_HEIGHT, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_INDUSTRY_TEXT), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SMOOTHNESS_TEXT), SetDataTip(STR_MAPGEN_SMOOTHNESS, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SNOW_LINE_HEIGHT, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SMOOTHNESS, STR_NULL), SetFill(1, 1), EndContainer(), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), /* Starting date. */ @@ -205,24 +186,24 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10), NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3), NWidget(NWID_SPACER), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_NW_TEXT), SetDataTip(STR_MAPGEN_NORTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_NW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHWEST), SetFill(1, 1), NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_SW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHWEST), SetFill(1, 1), NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_NE_TEXT), SetDataTip(STR_MAPGEN_NORTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), NWidget(NWID_SPACER), SetFill(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10), NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3), NWidget(NWID_SPACER), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_SW_TEXT), SetDataTip(STR_MAPGEN_SOUTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_NE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHEAST), SetFill(1, 1), NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_SE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHEAST), SetFill(1, 1), NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_SE_TEXT), SetDataTip(STR_MAPGEN_SOUTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1), NWidget(NWID_SPACER), SetFill(1, 1), EndContainer(), EndContainer(), @@ -236,7 +217,7 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { 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(WWT_PANEL, COLOUR_BROWN), NWidget(NWID_SPACER), SetMinimalSize(0, 10), /* Landscape selection. */ NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 10), @@ -254,13 +235,13 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10), /* Labels at the left side. */ NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_HEIGHTMAP_NAME_LABEL), SetDataTip(STR_MAPGEN_HEIGHTMAP_NAME, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_X_TEXT), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TOWN_TEXT), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_INDUSTRY_TEXT), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_RANDOM_TEXT), SetDataTip(STR_MAPGEN_RANDOM_SEED, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TREE_TEXT), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_HEIGHTMAP_ROTATION_TEXT), SetDataTip(STR_MAPGEN_HEIGHTMAP_ROTATION, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_HEIGHTMAP_NAME, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_RANDOM_SEED, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_HEIGHTMAP_ROTATION, STR_NULL), SetFill(1, 1), EndContainer(), /* Widgets at the right of the labels. */ NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), @@ -268,7 +249,7 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { /* Mapsize X * Y. */ NWidget(NWID_HORIZONTAL), SetPIP(0, 4, 0), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), SetFill(1, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_Y_TEXT), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), SetFill(1, 0), EndContainer(), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TOWN_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0), @@ -281,13 +262,13 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), NWidget(WWT_EMPTY, INVALID_COLOUR, GLAND_HEIGHTMAP_NAME_SPACER), SetFill(1, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_HEIGHTMAP_SIZE_LABEL), SetDataTip(STR_MAPGEN_HEIGHTMAP_SIZE_LABEL, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_START_DATE_TEXT1), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetFill(1, 1), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT1), SetDataTip(STR_MAPGEN_SNOW_LINE_HEIGHT, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_HEIGHTMAP_SIZE_LABEL, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetFill(1, 1), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SNOW_LINE_HEIGHT, STR_NULL), SetFill(1, 1), EndContainer(), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), NWidget(WWT_EMPTY, INVALID_COLOUR, GLAND_HEIGHTMAP_NAME_SPACER), SetFill(1, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_HEIGHTMAP_SIZE_TEXT), SetDataTip(STR_MAPGEN_HEIGHTMAP_SIZE, STR_NULL), SetFill(1, 0), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_HEIGHTMAP_SIZE, STR_NULL), SetFill(1, 0), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_START_DATE_DOWN), SetDataTip(SPR_ARROW_DOWN, STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD), SetFill(0, 1), NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_START_DATE_TEXT), SetDataTip(STR_BLACK_DATE_LONG, STR_NULL), SetFill(1, 0), @@ -526,8 +507,6 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { virtual void OnClick(Point pt, int widget) { switch (widget) { - case 0: delete this; break; - case GLAND_TEMPERATE: case GLAND_ARCTIC: case GLAND_TROPICAL: @@ -829,22 +808,17 @@ void StartNewGameWithoutGUI(uint seed) /** Widget numbers of the create scenario window. */ enum CreateScenarioWindowWidgets { - CSCEN_BACKGROUND, ///< Background panel. CSCEN_TEMPERATE, ///< Select temperate landscape style. CSCEN_ARCTIC, ///< Select arctic landscape style. CSCEN_TROPICAL, ///< Select tropical landscape style. CSCEN_TOYLAND, ///< Select toy-land landscape style. CSCEN_EMPTY_WORLD, ///< Generate an empty flat world. CSCEN_RANDOM_WORLD, ///< Generate random land button - CSCEN_MAPSIZE_X_TEXT, ///< Clickable currently selected x map size. CSCEN_MAPSIZE_X_PULLDOWN, ///< Pull-down arrow for x map size. - CSCEN_MAPSIZE_Y_TEXT, ///< Clickable currently selected y map size. CSCEN_MAPSIZE_Y_PULLDOWN, ///< Pull-down arrow for y map size. - CSCEN_START_DATE_LABEL, ///< 'Date' label CSCEN_START_DATE_DOWN, ///< Decrease start year (start earlier). CSCEN_START_DATE_TEXT, ///< Clickable start date value. CSCEN_START_DATE_UP, ///< Increase start year (start later). - CSCEN_FLAT_LAND_HEIGHT_LABEL, ///< 'Height of flat land' label. CSCEN_FLAT_LAND_HEIGHT_DOWN, ///< Decrease flat land height. CSCEN_FLAT_LAND_HEIGHT_TEXT, ///< Clickable flat land height value. CSCEN_FLAT_LAND_HEIGHT_UP ///< Increase flat land height. @@ -1035,7 +1009,7 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { 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(WWT_PANEL, COLOUR_BROWN), NWidget(NWID_SPACER), SetMinimalSize(0, 10), /* Landscape style selection. */ NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10), @@ -1054,15 +1028,15 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { NWidget(NWID_VERTICAL), SetPIP(10, 6, 10), /* Map size. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_TEXT, COLOUR_ORANGE, CSCEN_MAPSIZE_X_TEXT), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetPadding(1, 0, 0, 0), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAPSIZE, STR_NULL), SetPadding(1, 0, 0, 0), NWidget(NWID_SPACER), SetMinimalSize(6, 0), SetFill(1, 0), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, CSCEN_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), SetPadding(0, 4, 0, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE, CSCEN_MAPSIZE_Y_TEXT), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 2, 0, 0), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 2, 0, 0), NWidget(WWT_DROPDOWN, COLOUR_ORANGE, CSCEN_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_NULL), EndContainer(), /* Date. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_TEXT, COLOUR_ORANGE, CSCEN_START_DATE_LABEL), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetPadding(1, 0, 0, 0), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_DATE, STR_NULL), SetPadding(1, 0, 0, 0), NWidget(NWID_SPACER), SetMinimalSize(6, 0), SetFill(1, 0), NWidget(WWT_IMGBTN, COLOUR_ORANGE, CSCEN_START_DATE_DOWN), SetFill(0, 1), SetDataTip(SPR_ARROW_DOWN, STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD), NWidget(WWT_TEXTBTN, COLOUR_ORANGE, CSCEN_START_DATE_TEXT), SetDataTip(STR_BLACK_DATE_LONG, STR_NULL), @@ -1070,7 +1044,7 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { EndContainer(), /* Flat map height. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_TEXT, COLOUR_ORANGE, CSCEN_FLAT_LAND_HEIGHT_LABEL), + NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_SE_MAPGEN_FLAT_WORLD_HEIGHT, STR_NULL), SetPadding(1, 0, 0, 0), NWidget(NWID_SPACER), SetMinimalSize(6, 0), SetFill(1, 0), NWidget(WWT_IMGBTN, COLOUR_ORANGE, CSCEN_FLAT_LAND_HEIGHT_DOWN), SetFill(0, 1), SetDataTip(SPR_ARROW_DOWN, STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN), @@ -1096,7 +1070,6 @@ void ShowCreateScenario() } enum GenerationProgressWindowWidgets { - GPWW_BACKGROUND, GPWW_PROGRESS_BAR, GPWW_PROGRESS_TEXT, GPWW_ABORT, @@ -1104,7 +1077,7 @@ enum GenerationProgressWindowWidgets { static const NWidgetPart _nested_generate_progress_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GENERATION_WORLD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_PANEL, COLOUR_GREY, GPWW_BACKGROUND), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPIP(20, 0, 20), NWidget(NWID_VERTICAL), SetPIP(11, 8, 11), NWidget(WWT_EMPTY, INVALID_COLOUR, GPWW_PROGRESS_BAR), SetFill(1, 0), diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index d8676aa17..584aa6a4b 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1140,8 +1140,6 @@ void ShowCompanyLeagueTable() /** Widget numbers of the performance rating details window. */ enum PerformanceRatingDetailsWidgets { - PRW_BACKGROUND, - PRW_SCORE_FIRST, PRW_SCORE_LAST = PRW_SCORE_FIRST + (SCORE_END - SCORE_BEGIN) - 1, @@ -1456,7 +1454,7 @@ static const NWidgetPart _nested_performance_rating_detail_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_GREY), NWidgetFunction(MakeCompanyButtonRows), SetPadding(0, 1, 1, 2), EndContainer(), NWidgetFunction(MakePerformanceDetailPanels), diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 38df39e3b..761e02b0d 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -37,17 +37,13 @@ enum GroupListWidgets { GRP_WIDGET_CAPTION, GRP_WIDGET_SORT_BY_ORDER, GRP_WIDGET_SORT_BY_DROPDOWN, - GRP_WIDGET_EMPTY_TOP_RIGHT, GRP_WIDGET_LIST_VEHICLE, GRP_WIDGET_LIST_VEHICLE_SCROLLBAR, - GRP_WIDGET_EMPTY2, GRP_WIDGET_AVAILABLE_VEHICLES, GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN, GRP_WIDGET_STOP_ALL, GRP_WIDGET_START_ALL, - GRP_WIDGET_EMPTY_BOTTOM_RIGHT, - GRP_WIDGET_EMPTY_TOP_LEFT, GRP_WIDGET_ALL_VEHICLES, GRP_WIDGET_DEFAULT_VEHICLES, GRP_WIDGET_LIST_GROUP, @@ -55,7 +51,6 @@ enum GroupListWidgets { GRP_WIDGET_CREATE_GROUP, GRP_WIDGET_DELETE_GROUP, GRP_WIDGET_RENAME_GROUP, - GRP_WIDGET_EMPTY1, GRP_WIDGET_REPLACE_PROTECTION, }; @@ -97,7 +92,7 @@ static const NWidgetPart _nested_group_widgets[] = { NWidget(NWID_HORIZONTAL), /* left part */ NWidget(NWID_VERTICAL), - NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_EMPTY_TOP_LEFT), SetMinimalTextLines(1, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM), SetFill(1, 0), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalTextLines(1, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM), SetFill(1, 0), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_ALL_VEHICLES), SetMinimalSize(200, 13), SetFill(1, 0), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_DEFAULT_VEHICLES), SetMinimalSize(200, 13), SetFill(1, 0), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -112,10 +107,10 @@ static const NWidgetPart _nested_group_widgets[] = { SetDataTip(SPR_GROUP_DELETE_TRAIN, STR_GROUP_DELETE_TOOLTIP), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, GRP_WIDGET_RENAME_GROUP), SetMinimalSize(24, 25), SetFill(0, 1), SetDataTip(SPR_GROUP_RENAME_TRAIN, STR_GROUP_RENAME_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_EMPTY1), SetMinimalSize(92, 25), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(92, 25), SetFill(1, 1), EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, GRP_WIDGET_REPLACE_PROTECTION), SetMinimalSize(24, 25), SetFill(0, 1), SetDataTip(SPR_GROUP_REPLACE_OFF_TRAIN, STR_GROUP_REPLACE_PROTECTION_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_EMPTY2), SetMinimalSize(12, 25), SetFill(0, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 25), SetFill(0, 1), EndContainer(), EndContainer(), EndContainer(), /* right part */ @@ -123,7 +118,7 @@ static const NWidgetPart _nested_group_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, GRP_WIDGET_SORT_BY_ORDER), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), NWidget(WWT_DROPDOWN, COLOUR_GREY, GRP_WIDGET_SORT_BY_DROPDOWN), SetMinimalSize(167, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIAP), - NWidget(WWT_PANEL, COLOUR_GREY, GRP_WIDGET_EMPTY_TOP_RIGHT), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_MATRIX, COLOUR_GREY, GRP_WIDGET_LIST_VEHICLE), SetMinimalSize(248, 0), SetDataTip(0x701, STR_NULL), SetResize(1, 1), SetFill(1, 0), @@ -138,7 +133,7 @@ static const NWidgetPart _nested_group_widgets[] = { SetDataTip(SPR_FLAG_VEH_STOPPED, STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP), 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_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 1), SetResize(1, 0), EndContainer(), NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 32423f318..8e55de8c7 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -554,12 +554,9 @@ static inline bool IsProductionAlterable(const Industry *i) /** Names of the widgets of the view industry gui */ enum IndustryViewWidgets { IVW_CAPTION, - IVW_BACKGROUND, - IVW_INSET, IVW_VIEWPORT, IVW_INFO, IVW_GOTO, - IVW_SPACER, }; class IndustryViewWindow : public Window @@ -798,8 +795,8 @@ static const NWidgetPart _nested_industry_view_widgets[] = { NWidget(WWT_CAPTION, COLOUR_CREAM, IVW_CAPTION), SetDataTip(STR_INDUSTRY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), 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), + NWidget(WWT_PANEL, COLOUR_CREAM), + NWidget(WWT_INSET, COLOUR_CREAM), SetPadding(2, 2, 2, 2), NWidget(NWID_VIEWPORT, INVALID_COLOUR, IVW_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetPadding(1, 1, 1, 1), SetResize(1, 1), EndContainer(), EndContainer(), @@ -807,7 +804,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = { EndContainer(), 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_PANEL, COLOUR_CREAM), SetResize(1, 0), EndContainer(), NWidget(WWT_RESIZEBOX, COLOUR_CREAM), EndContainer(), }; @@ -829,7 +826,6 @@ void ShowIndustryViewWindow(int industry) enum IndustryDirectoryWidgets { IDW_DROPDOWN_ORDER, IDW_DROPDOWN_CRITERIA, - IDW_SPACER, IDW_INDUSTRY_LIST, IDW_SCROLLBAR, }; @@ -846,11 +842,9 @@ static const NWidgetPart _nested_industry_directory_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_TEXTBTN, COLOUR_BROWN, IDW_DROPDOWN_ORDER), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), NWidget(WWT_DROPDOWN, COLOUR_BROWN, IDW_DROPDOWN_CRITERIA), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIAP), - NWidget(WWT_PANEL, COLOUR_BROWN, IDW_SPACER), SetResize(1, 0), - EndContainer(), - EndContainer(), - NWidget(WWT_PANEL, COLOUR_BROWN, IDW_INDUSTRY_LIST), SetDataTip(0x0, STR_INDUSTRY_DIRECTORY_LIST_CAPTION), SetResize(1, 1), + NWidget(WWT_PANEL, COLOUR_BROWN), SetResize(1, 0), EndContainer(), EndContainer(), + NWidget(WWT_PANEL, COLOUR_BROWN, IDW_INDUSTRY_LIST), SetDataTip(0x0, STR_INDUSTRY_DIRECTORY_LIST_CAPTION), SetResize(1, 1), EndContainer(), EndContainer(), NWidget(NWID_VERTICAL), NWidget(WWT_SCROLLBAR, COLOUR_BROWN, IDW_SCROLLBAR), diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 851d8d96f..6811af3b0 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -36,7 +36,6 @@ static inline void SetNewLandscapeType(byte landscape) } enum SelectGameIntroWidgets { - SGI_BACKGROUND, SGI_GENERATE_GAME, SGI_LOAD_GAME, SGI_PLAY_SCENARIO, @@ -153,8 +152,7 @@ struct SelectGameWindow : public Window { static const NWidgetPart _nested_select_game_widgets[] = { NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INTRO_CAPTION, STR_NULL), - NWidget(WWT_PANEL, COLOUR_BROWN, SGI_BACKGROUND), - + NWidget(WWT_PANEL, COLOUR_BROWN), NWidget(NWID_SPACER), SetMinimalSize(0, 8), /* 'generate game' and 'load game' buttons */ diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index a4f5ee3cb..fea06d27c 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -319,13 +319,8 @@ void PlaceLandBlockInfo() /** Widgets for the land info window. */ enum AboutWidgets { - AW_BACKGROUND, ///< Background to draw on - AW_ABOUT_ORIG_COPYRIGHT, ///< Text with original copyright info - AW_ABOUT_VERSION, ///< OpenTTD version string - AW_FRAME, ///< The frame with the scrolling text AW_SCROLLING_TEXT, ///< The actually scrolling text AW_WEBSITE, ///< URL of OpenTTD website - AW_ABOUT_COPYRIGHT, ///< OpenTTD copyright info }; static const NWidgetPart _nested_about_widgets[] = { @@ -333,14 +328,14 @@ static const NWidgetPart _nested_about_widgets[] = { 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), - NWidget(WWT_TEXT, COLOUR_GREY, AW_ABOUT_VERSION), SetDataTip(STR_ABOUT_VERSION, STR_NULL), - NWidget(WWT_FRAME, COLOUR_GREY, AW_FRAME), SetPadding(0, 5, 1, 5), + NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(4, 2, 4), + NWidget(WWT_TEXT, COLOUR_GREY), SetDataTip(STR_ABOUT_ORIGINAL_COPYRIGHT, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY), SetDataTip(STR_ABOUT_VERSION, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetPadding(0, 5, 1, 5), NWidget(WWT_EMPTY, INVALID_COLOUR, AW_SCROLLING_TEXT), EndContainer(), NWidget(WWT_TEXT, COLOUR_GREY, AW_WEBSITE), SetDataTip(STR_BLACK_RAW_STRING, STR_NULL), - NWidget(WWT_TEXT, COLOUR_GREY, AW_ABOUT_COPYRIGHT), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL), EndContainer(), }; @@ -487,7 +482,6 @@ void ShowAboutWindow() /** Widgets of the error message windows */ enum ErrorMessageWidgets { EMW_CAPTION, - EMW_PANEL, EMW_FACE, EMW_MESSAGE, }; @@ -497,7 +491,7 @@ static const NWidgetPart _nested_errmsg_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_RED), NWidget(WWT_EMPTY, COLOUR_RED, EMW_MESSAGE), SetPadding(0, 2, 0, 2), SetMinimalSize(236, 32), EndContainer(), }; @@ -514,7 +508,7 @@ static const NWidgetPart _nested_errmsg_face_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_RED), NWidget(NWID_HORIZONTAL), SetPIP(2, 1, 2), NWidget(WWT_EMPTY, COLOUR_RED, EMW_FACE), SetMinimalSize(91, 120), SetFill(0, 1), SetPadding(2, 0, 1, 0), NWidget(WWT_EMPTY, COLOUR_RED, EMW_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123), @@ -1300,7 +1294,6 @@ void QueryStringBaseWindow::OnOpenOSKWindow(int wid) /** Widget of the string query window. */ enum QueryStringWidgets { QUERY_STR_WIDGET_CAPTION, - QUERY_STR_WIDGET_BACKGROUND, QUERY_STR_WIDGET_TEXT, QUERY_STR_WIDGET_DEFAULT, QUERY_STR_WIDGET_CANCEL, @@ -1424,7 +1417,7 @@ static const NWidgetPart _nested_query_string_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EDITBOX, COLOUR_GREY, QUERY_STR_WIDGET_TEXT), SetMinimalSize(256, 12), SetFill(1, 1), SetPadding(2, 2, 2, 2), EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), @@ -1460,7 +1453,6 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, uint maxwidth enum QueryWidgets { QUERY_WIDGET_CAPTION, - QUERY_WIDGET_BACKGROUND, QUERY_WIDGET_TEXT, QUERY_WIDGET_NO, QUERY_WIDGET_YES @@ -1579,7 +1571,7 @@ static const NWidgetPart _nested_query_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_RED), SetPIP(8, 15, 8), NWidget(WWT_TEXT, COLOUR_RED, QUERY_WIDGET_TEXT), SetMinimalSize(200, 12), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(20, 29, 20), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, QUERY_WIDGET_NO), SetMinimalSize(71, 12), SetDataTip(STR_QUIT_NO, STR_NULL), diff --git a/src/music_gui.cpp b/src/music_gui.cpp index e17db0d17..5a2db97b4 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -206,8 +206,6 @@ static void SelectPlaylist(byte list) } enum MusicTrackSelectionWidgets { - MTSW_BACKGROUND, - MTSW_TRACKLIST, MTSW_LIST_LEFT, MTSW_PLAYLIST, MTSW_LIST_RIGHT, @@ -379,11 +377,11 @@ static const NWidgetPart _nested_music_track_selection_widgets[] = { 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(WWT_PANEL, COLOUR_GREY), NWidget(NWID_HORIZONTAL), SetPIP(2, 4, 2), /* Left panel. */ NWidget(NWID_VERTICAL), - NWidget(WWT_LABEL, COLOUR_GREY, MTSW_TRACKLIST), SetDataTip(STR_PLAYLIST_TRACK_INDEX, STR_NULL), + NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_PLAYLIST_TRACK_INDEX, STR_NULL), NWidget(WWT_PANEL, COLOUR_GREY, MTSW_LIST_LEFT), SetMinimalSize(180, 194), SetDataTip(0x0, STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(0, 2), EndContainer(), diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 22c013a8b..33e452b86 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -120,10 +120,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint /** Names of the add a newgrf window widgets. */ enum AddNewGRFWindowWidgets { - ANGRFW_FILTER_PANEL, - ANGRFW_FILTER_TITLE, ANGRFW_FILTER, - ANGRFW_BACKGROUND, ANGRFW_GRF_LIST, ANGRFW_SCROLLBAR, ANGRFW_GRF_INFO, @@ -460,14 +457,14 @@ static const NWidgetPart _nested_newgrf_add_dlg_widgets[] = { 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(WWT_PANEL, COLOUR_GREY), 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), - NWidget(WWT_TEXT, COLOUR_GREY, ANGRFW_FILTER_TITLE), SetFill(0, 1), SetDataTip(STR_LIST_FILTER_TITLE, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_LIST_FILTER_TITLE, STR_NULL), NWidget(WWT_EDITBOX, COLOUR_GREY, ANGRFW_FILTER), SetFill(1, 0), SetMinimalSize(100, 12), SetResize(1, 0), SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_GREY, ANGRFW_BACKGROUND), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_INSET, COLOUR_GREY, ANGRFW_GRF_LIST), SetMinimalSize(290, 1), SetResize(1, 1), SetPadding(2, 2, 2, 2), EndContainer(), EndContainer(), NWidget(WWT_SCROLLBAR, COLOUR_GREY, ANGRFW_SCROLLBAR), @@ -513,11 +510,9 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed); /** Names of the manage newgrfs window widgets. */ enum ShowNewGRFStateWidgets { - SNGRFS_BACKGROUND1, SNGRFS_PRESET_LIST, SNGRFS_PRESET_SAVE, SNGRFS_PRESET_DELETE, - SNGRFS_BACKGROUND2, SNGRFS_ADD, SNGRFS_REMOVE, SNGRFS_MOVE_UP, @@ -1008,7 +1003,7 @@ static const NWidgetPart _nested_newgrf_widgets[] = { 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(WWT_PANEL, COLOUR_MAUVE), NWidget(NWID_HORIZONTAL), SetPadding(2, 10, 2, 10), NWidget(WWT_DROPDOWN, COLOUR_YELLOW, SNGRFS_PRESET_LIST), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), @@ -1017,7 +1012,7 @@ static const NWidgetPart _nested_newgrf_widgets[] = { EndContainer(), EndContainer(), EndContainer(), - NWidget(WWT_PANEL, COLOUR_MAUVE, SNGRFS_BACKGROUND2), + NWidget(WWT_PANEL, COLOUR_MAUVE), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPadding(2, 10, 2, 10), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, SNGRFS_ADD), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_NEWGRF_SETTINGS_ADD, STR_NEWGRF_SETTINGS_ADD_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, SNGRFS_REMOVE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_NEWGRF_SETTINGS_REMOVE, STR_NEWGRF_SETTINGS_REMOVE_TOOLTIP), diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 08e6aefa9..edc4655c8 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -23,9 +23,7 @@ /** Widget numbers of the on-screen keyboard (OSK) window. */ enum OskWidgets { OSK_WIDGET_CAPTION, ///< Title bar. - OSK_WIDGET_TEXT_BACKGROUND, ///< Background around the edit box. OSK_WIDGET_TEXT, ///< Edit box. - OSK_WIDGET_KEYS_BACKGROUND, ///< Background of the keys. OSK_WIDGET_CANCEL, ///< Cancel key. OSK_WIDGET_OK, ///< Ok key. OSK_WIDGET_BACKSPACE, ///< Backspace key. @@ -372,10 +370,10 @@ static NWidgetBase *MakeSpacebarKeys(int *biggest_index) static const NWidgetPart _nested_osk_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, OSK_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_NULL), - NWidget(WWT_PANEL, COLOUR_GREY, OSK_WIDGET_TEXT_BACKGROUND), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EDITBOX, COLOUR_GREY, OSK_WIDGET_TEXT), SetMinimalSize(252, 12), SetPadding(2, 2, 2, 2), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, OSK_WIDGET_KEYS_BACKGROUND), SetPIP(5, 2, 3), + NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(5, 2, 3), NWidgetFunction(MakeTopKeys), SetPadding(0, 3, 0, 3), NWidgetFunction(MakeNumberKeys), SetPadding(0, 3, 0, 3), NWidgetFunction(MakeQwertyKeys), SetPadding(0, 3, 0, 3), diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 17999b31d..c6796b4b9 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -287,7 +287,6 @@ static void PlaceRail_AutoSignals(TileIndex tile) /** Enum referring to the widgets of the build rail toolbar */ enum RailToolbarWidgets { RTW_CAPTION, - RTW_SPACER, RTW_BUILD_NS, RTW_BUILD_X, RTW_BUILD_EW, @@ -833,7 +832,7 @@ static const NWidgetPart _nested_build_rail_widgets[] = { NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_AUTORAIL), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTORAIL, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, RTW_SPACER), SetMinimalSize(4, 22), SetDataTip(0x0, STR_NULL), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), SetDataTip(0x0, STR_NULL), EndContainer(), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, RTW_DEMOLISH), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC), @@ -918,13 +917,11 @@ static void HandleStationPlacement(TileIndex start, TileIndex end) enum BuildRailStationWidgets { BRSW_BACKGROUND, - BRSW_ORIENT_LABEL, ///< Text label 'Orientation'. BRSW_PLATFORM_DIR_X, BRSW_PLATFORM_DIR_Y, - BRSW_PLATFORM_NUM_LABEL, ///< Text label 'Number of platforms' - BRSW_PLATFORM_NUM_BEGIN = BRSW_PLATFORM_NUM_LABEL, - BRSW_PLATFORM_NUM_1, + BRSW_PLATFORM_NUM_BEGIN, + BRSW_PLATFORM_NUM_1 = BRSW_PLATFORM_NUM_BEGIN, BRSW_PLATFORM_NUM_2, BRSW_PLATFORM_NUM_3, BRSW_PLATFORM_NUM_4, @@ -932,9 +929,8 @@ enum BuildRailStationWidgets { BRSW_PLATFORM_NUM_6, BRSW_PLATFORM_NUM_7, - BRSW_PLATFORM_LEN_LABEL, ///< Text label 'Platform length' - BRSW_PLATFORM_LEN_BEGIN = BRSW_PLATFORM_LEN_LABEL, - BRSW_PLATFORM_LEN_1, + BRSW_PLATFORM_LEN_BEGIN, + BRSW_PLATFORM_LEN_1 = BRSW_PLATFORM_LEN_BEGIN, BRSW_PLATFORM_LEN_2, BRSW_PLATFORM_LEN_3, BRSW_PLATFORM_LEN_4, @@ -944,7 +940,6 @@ enum BuildRailStationWidgets { BRSW_PLATFORM_DRAG_N_DROP, - BRSW_HIGHLIGHT_LABEL, ///< Text label 'Coverage area highlight' BRSW_HIGHLIGHT_OFF, BRSW_HIGHLIGHT_ON, @@ -1355,7 +1350,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = { 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), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ORIENTATION, STR_NULL), SetPadding(1, 2, 0, 2), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0), NWidget(WWT_PANEL, COLOUR_GREY, BRSW_PLATFORM_DIR_X), SetMinimalSize(66, 48), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(), @@ -1363,7 +1358,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, BRSW_PLATFORM_DIR_Y), SetMinimalSize(66, 48), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_PLATFORM_NUM_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_NUMBER_OF_TRACKS, STR_NULL), SetPadding(2, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_NUMBER_OF_TRACKS, STR_NULL), SetPadding(2, 2, 0, 2), NWidget(NWID_HORIZONTAL), SetPIP(22, 0, 21), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), @@ -1373,7 +1368,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_6), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_6, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_7), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_7, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_PLATFORM_LEN_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_PLATFORM_LENGTH, STR_NULL), SetPadding(2, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_PLATFORM_LENGTH, STR_NULL), SetPadding(2, 2, 0, 2), NWidget(NWID_HORIZONTAL), SetPIP(22, 0, 21), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_LEN_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_LEN_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP), @@ -1389,7 +1384,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_DRAG_N_DROP), SetMinimalSize(75, 12), SetDataTip(STR_STATION_BUILD_DRAG_DROP, STR_STATION_BUILD_DRAG_DROP_TOOLTIP), NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_HIGHLIGHT_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetPadding(3, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetPadding(3, 2, 0, 2), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_HIGHLIGHT_OFF), SetMinimalSize(60, 12), @@ -1416,7 +1411,7 @@ static const NWidgetPart _nested_newstation_builder_widgets[] = { EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(0, 1), /* end newstations gui additions. */ - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_ORIENT_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ORIENTATION, STR_NULL), SetPadding(1, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ORIENTATION, STR_NULL), SetPadding(1, 2, 0, 2), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0), NWidget(WWT_PANEL, COLOUR_GREY, BRSW_PLATFORM_DIR_X), SetMinimalSize(66, 48), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(), @@ -1424,7 +1419,7 @@ static const NWidgetPart _nested_newstation_builder_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, BRSW_PLATFORM_DIR_Y), SetMinimalSize(66, 48), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_PLATFORM_NUM_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_NUMBER_OF_TRACKS, STR_NULL), SetPadding(2, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_NUMBER_OF_TRACKS, STR_NULL), SetPadding(2, 2, 0, 2), NWidget(NWID_HORIZONTAL), SetPIP(22, 0, 21), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), @@ -1434,7 +1429,7 @@ static const NWidgetPart _nested_newstation_builder_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_6), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_6, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_NUM_7), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_7, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_PLATFORM_LEN_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_PLATFORM_LENGTH, STR_NULL), SetPadding(2, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_PLATFORM_LENGTH, STR_NULL), SetPadding(2, 2, 0, 2), NWidget(NWID_HORIZONTAL), SetPIP(22, 0, 21), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_LEN_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_LEN_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP), @@ -1450,7 +1445,7 @@ static const NWidgetPart _nested_newstation_builder_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_PLATFORM_DRAG_N_DROP), SetMinimalSize(75, 12), SetDataTip(STR_STATION_BUILD_DRAG_DROP, STR_STATION_BUILD_DRAG_DROP_TOOLTIP), NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0), EndContainer(), - NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_HIGHLIGHT_LABEL), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetPadding(3, 2, 0, 2), + NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetPadding(3, 2, 0, 2), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0), NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_HIGHLIGHT_OFF), SetMinimalSize(60, 12), @@ -1694,7 +1689,6 @@ static void ShowSignalBuilder(Window *parent) /** Enum referring to the widgets of the build rail depot window */ enum BuildRailDepotWidgets { - BRDW_BACKGROUND, BRDW_DEPOT_NE, BRDW_DEPOT_SE, BRDW_DEPOT_SW, @@ -1743,7 +1737,7 @@ static const NWidgetPart _nested_build_depot_widgets[] = { 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(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_SPACER), SetMinimalSize(0, 3), NWidget(NWID_HORIZONTAL_LTR), NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), @@ -1782,7 +1776,6 @@ static void ShowBuildTrainDepotPicker(Window *parent) /** Enum referring to the widgets of the build NewGRF rail waypoint window */ enum BuildRailWaypointWidgets { - BRWW_BACKGROUND, BRWW_WAYPOINT_1, BRWW_WAYPOINT_2, BRWW_WAYPOINT_3, @@ -1855,7 +1848,7 @@ static const NWidgetPart _nested_build_waypoint_widgets[] = { 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(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_SPACER), SetMinimalSize(0, 3), NWidget(NWID_HORIZONTAL), SetPIP(3, 2, 3), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRWW_WAYPOINT_1), SetMinimalSize(66, 60), SetDataTip(0x0, STR_WAYPOINT_GRAPHICS_TOOLTIP), EndContainer(), diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 59f718bdd..c2a1ad8d4 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -758,7 +758,6 @@ void ShowBuildRoadScenToolbar() /** Enum referring to the widgets of the build road depot window */ enum BuildRoadDepotWidgets { BRDW_CAPTION, - BRDW_BACKGROUND, BRDW_DEPOT_NE, BRDW_DEPOT_SE, BRDW_DEPOT_SW, @@ -816,7 +815,7 @@ static const NWidgetPart _nested_build_road_depot_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_SPACER), SetMinimalSize(0, 3), NWidget(NWID_HORIZONTAL_LTR), NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0), diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 6c386c9f1..f3d7a08c3 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -104,29 +104,18 @@ static int GetCurRes() /** Widgets of the game options menu */ enum GameOptionsWidgets { GOW_BACKGROUND, ///< Background of the window - GOW_CURRENCY_FRAME, ///< Frame of the currency dropdown GOW_CURRENCY_DROPDOWN, ///< Currency dropdown - GOW_DISTANCE_FRAME, ///< Measuring unit frame GOW_DISTANCE_DROPDOWN, ///< Measuring unit dropdown - GOW_ROADSIDE_FRAME, ///< Road side frame GOW_ROADSIDE_DROPDOWN, ///< Dropdown to select the road side (to set the right side ;)) - GOW_TOWNNAME_FRAME, ///< Frame for the town name dropdown GOW_TOWNNAME_DROPDOWN, ///< Town name dropdown - GOW_AUTOSAVE_FRAME, ///< Frame for autosave GOW_AUTOSAVE_DROPDOWN, ///< Dropdown to say how often to autosave - GOW_LANG_FRAME, ///< Language dropdown frame GOW_LANG_DROPDOWN, ///< Language dropdown - GOW_RESOLUTION_FRAME, ///< Frame for the dropdown for the resolution GOW_RESOLUTION_DROPDOWN, ///< Dropdown for the resolution - GOW_FULLSCREEN_LABEL, ///< Text (right) to the fullscreen button GOW_FULLSCREEN_BUTTON, ///< Toggle fullscreen - GOW_SCREENSHOT_FRAME, ///< Frame for the screenshot type GOW_SCREENSHOT_DROPDOWN, ///< Select the screenshot type... please use PNG! - GOW_BASE_GRF_FRAME, ///< Base GRF selection frame GOW_BASE_GRF_DROPDOWN, ///< Use to select a base GRF GOW_BASE_GRF_STATUS, ///< Info about missing files etc. GOW_BASE_GRF_DESCRIPTION,///< Description of selected base GRF - GOW_BASE_SFX_FRAME, ///< Base SFX selection frame GOW_BASE_SFX_DROPDOWN, ///< Use to select a base SFX GOW_BASE_SFX_DESCRIPTION,///< Description of selected base SFX }; @@ -433,42 +422,42 @@ static const NWidgetPart _nested_game_options_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, GOW_BACKGROUND), SetPIP(6, 6, 10), NWidget(NWID_HORIZONTAL), SetPIP(10, 10, 10), NWidget(NWID_VERTICAL), SetPIP(0, 6, 0), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_CURRENCY_FRAME), SetDataTip(STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_CURRENCY_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_ROADSIDE_FRAME), SetDataTip(STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_ROADSIDE_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_AUTOSAVE_FRAME), SetDataTip(STR_GAME_OPTIONS_AUTOSAVE_FRAME, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_AUTOSAVE_FRAME, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_AUTOSAVE_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_RESOLUTION_FRAME), SetDataTip(STR_GAME_OPTIONS_RESOLUTION, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_RESOLUTION, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_RESOLUTION_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_RESOLUTION_TOOLTIP), SetFill(1, 0), SetPadding(0, 0, 3, 0), NWidget(NWID_HORIZONTAL), - NWidget(WWT_TEXT, COLOUR_GREY, GOW_FULLSCREEN_LABEL), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_FULLSCREEN, STR_NULL), + NWidget(WWT_TEXT, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 0), SetDataTip(STR_GAME_OPTIONS_FULLSCREEN, STR_NULL), NWidget(WWT_TEXTBTN, COLOUR_GREY, GOW_FULLSCREEN_BUTTON), SetMinimalSize(21, 9), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP), EndContainer(), EndContainer(), EndContainer(), NWidget(NWID_VERTICAL), SetPIP(0, 6, 0), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_DISTANCE_FRAME), SetDataTip(STR_GAME_OPTIONS_MEASURING_UNITS_FRAME, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_MEASURING_UNITS_FRAME, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_DISTANCE_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_MEASURING_UNITS_DROPDOWN_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_TOWNNAME_FRAME), SetDataTip(STR_GAME_OPTIONS_TOWN_NAMES_FRAME, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_TOWN_NAMES_FRAME, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_TOWNNAME_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_LANG_FRAME), SetDataTip(STR_GAME_OPTIONS_LANGUAGE, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_LANGUAGE, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_LANG_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_LANGUAGE_TOOLTIP), SetFill(1, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_SCREENSHOT_FRAME), SetDataTip(STR_GAME_OPTIONS_SCREENSHOT_FORMAT, STR_NULL), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_SCREENSHOT_FORMAT, STR_NULL), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_SCREENSHOT_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_STRING, STR_GAME_OPTIONS_SCREENSHOT_FORMAT_TOOLTIP), SetFill(1, 0), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(0, 0), SetFill(0, 1), EndContainer(), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_BASE_GRF_FRAME), SetDataTip(STR_GAME_OPTIONS_BASE_GRF, STR_NULL), SetPadding(0, 10, 0, 10), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_BASE_GRF, STR_NULL), SetPadding(0, 10, 0, 10), NWidget(NWID_HORIZONTAL), SetPIP(00, 30, 0), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_BASE_GRF_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_RAW_STRING, STR_GAME_OPTIONS_BASE_GRF_TOOLTIP), NWidget(WWT_TEXT, COLOUR_GREY, GOW_BASE_GRF_STATUS), SetMinimalSize(150, 12), SetDataTip(STR_EMPTY, STR_NULL), SetFill(1, 0), @@ -476,7 +465,7 @@ static const NWidgetPart _nested_game_options_widgets[] = { NWidget(WWT_TEXT, COLOUR_GREY, GOW_BASE_GRF_DESCRIPTION), SetMinimalSize(330, 0), SetDataTip(STR_EMPTY, STR_GAME_OPTIONS_BASE_GRF_DESCRIPTION_TOOLTIP), SetFill(1, 0), SetPadding(6, 0, 0, 0), EndContainer(), - NWidget(WWT_FRAME, COLOUR_GREY, GOW_BASE_SFX_FRAME), SetDataTip(STR_GAME_OPTIONS_BASE_SFX, STR_NULL), SetPadding(0, 10, 0, 10), + NWidget(WWT_FRAME, COLOUR_GREY), SetDataTip(STR_GAME_OPTIONS_BASE_SFX, STR_NULL), SetPadding(0, 10, 0, 10), NWidget(NWID_HORIZONTAL), SetPIP(0, 30, 0), NWidget(WWT_DROPDOWN, COLOUR_GREY, GOW_BASE_SFX_DROPDOWN), SetMinimalSize(150, 12), SetDataTip(STR_BLACK_RAW_STRING, STR_GAME_OPTIONS_BASE_SFX_TOOLTIP), NWidget(NWID_SPACER), SetFill(1, 0), @@ -505,14 +494,11 @@ extern void StartupEconomy(); /* Names of the game difficulty settings window */ enum GameDifficultyWidgets { - GDW_UPPER_BG, GDW_LVL_EASY, GDW_LVL_MEDIUM, GDW_LVL_HARD, GDW_LVL_CUSTOM, GDW_HIGHSCORE, - GDW_SETTING_BG, - GDW_LOWER_BG, GDW_ACCEPT, GDW_CANCEL, @@ -730,7 +716,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), SetDataTip(STR_DIFFICULTY_LEVEL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), - NWidget(WWT_PANEL, COLOUR_MAUVE, GDW_UPPER_BG), + NWidget(WWT_PANEL, COLOUR_MAUVE), NWidget(NWID_VERTICAL), SetPIP(2, 0, 2), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10), NWidget(WWT_TEXTBTN, COLOUR_YELLOW, GDW_LVL_EASY), SetDataTip(STR_DIFFICULTY_LEVEL_EASY, STR_NULL), SetFill(1, 0), @@ -743,14 +729,14 @@ static const NWidgetPart _nested_game_difficulty_widgets[] = { EndContainer(), EndContainer(), EndContainer(), - NWidget(WWT_PANEL, COLOUR_MAUVE, GDW_SETTING_BG), + NWidget(WWT_PANEL, COLOUR_MAUVE), NWidget(NWID_VERTICAL), SetPIP(3, 0, 1), NWidget(NWID_HORIZONTAL), SetPIP(5, 0, 5), NWidgetFunction(MakeDifficultyOptionsWidgets), EndContainer(), EndContainer(), EndContainer(), - NWidget(WWT_PANEL, COLOUR_MAUVE, GDW_LOWER_BG), + NWidget(WWT_PANEL, COLOUR_MAUVE), NWidget(NWID_VERTICAL), SetPIP(2, 0, 2), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10), NWidget(NWID_SPACER), SetFill(1, 0), @@ -1699,8 +1685,6 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic /** Widget numbers of the custom currency window. */ enum CustomCurrencyWidgets { - CUSTCURR_BACKGROUND, - CUSTCURR_RATE_DOWN, CUSTCURR_RATE_UP, CUSTCURR_RATE, @@ -1901,7 +1885,7 @@ static const NWidgetPart _nested_cust_currency_widgets[] = { 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(WWT_PANEL, COLOUR_GREY), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(7, 3, 0), NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 5), NWidget(NWID_BUTTON_ARROW, COLOUR_YELLOW, CUSTCURR_RATE_DOWN), SetDataTip(AWV_DECREASE, STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP), diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index dbaac6885..3b4bd43cb 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -241,12 +241,10 @@ static bool RenameSign(SignID index, const char *text) /** Widget numbers of the query sign edit window. */ enum QueryEditSignWidgets { QUERY_EDIT_SIGN_WIDGET_CAPTION, - QUERY_EDIT_SIGN_WIDGET_PANEL, QUERY_EDIT_SIGN_WIDGET_TEXT, QUERY_EDIT_SIGN_WIDGET_OK, QUERY_EDIT_SIGN_WIDGET_CANCEL, QUERY_EDIT_SIGN_WIDGET_DELETE, - QUERY_EDIT_SIGN_WIDGET_FILL, QUERY_EDIT_SIGN_WIDGET_PREVIOUS, QUERY_EDIT_SIGN_WIDGET_NEXT, }; @@ -396,14 +394,14 @@ static const NWidgetPart _nested_query_sign_edit_widgets[] = { 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), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_EDITBOX, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_TEXT), SetMinimalSize(256, 12), SetDataTip(STR_EDIT_SIGN_SIGN_OSKTITLE, STR_NULL), SetPadding(2, 2, 2, 2), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_OK), SetMinimalSize(61, 12), SetDataTip(STR_BUTTON_OK, STR_NULL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_CANCEL), SetMinimalSize(60, 12), SetDataTip(STR_BUTTON_CANCEL, STR_NULL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_DELETE), SetMinimalSize(60, 12), SetDataTip(STR_TOWN_VIEW_DELETE_BUTTON, STR_NULL), - NWidget(WWT_PANEL, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_FILL), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), EndContainer(), NWidget(NWID_BUTTON_ARROW, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_PREVIOUS), SetMinimalSize(11, 12), SetDataTip(AWV_DECREASE, STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP), NWidget(NWID_BUTTON_ARROW, COLOUR_GREY, QUERY_EDIT_SIGN_WIDGET_NEXT), SetMinimalSize(11, 12), SetDataTip(AWV_INCREASE, STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP), EndContainer(), diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index c1f992e00..e65a4e75b 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -45,7 +45,6 @@ enum SmallMapWindowWidgets { SM_WIDGET_OWNERS, SM_WIDGET_CENTERMAP, SM_WIDGET_TOGGLETOWNNAME, - SM_WIDGET_BOTTOMPANEL, SM_WIDGET_SELECTINDUSTRIES, SM_WIDGET_ENABLEINDUSTRIES, SM_WIDGET_DISABLEINDUSTRIES, @@ -84,7 +83,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = { EndContainer(), /* Bottom button row and resize box. */ NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_BROWN, SM_WIDGET_BOTTOMPANEL), + NWidget(WWT_PANEL, COLOUR_BROWN), NWidget(NWID_HORIZONTAL), NWidget(NWID_SELECTION, INVALID_COLOUR, SM_WIDGET_SELECTINDUSTRIES), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 6adee7888..9d922b936 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -100,14 +100,11 @@ enum StationListWidgets { SLW_SHIP, ///< 'SHIP' button - list only facilities where is a dock SLW_FACILALL, ///< 'ALL' button - list all facilities - SLW_PAN_BETWEEN, ///< Small panel between list of types of ficilities and list of cargo types SLW_NOCARGOWAITING, ///< 'NO' button - list stations where no cargo is waiting SLW_CARGOALL, ///< 'ALL' button - list all stations - SLW_PAN_RIGHT, ///< Panel right of list of cargo types SLW_SORTBY, ///< 'Sort by' button - reverse sort direction SLW_SORTDROPBTN, ///< Dropdown button - SLW_PAN_SORT_RIGHT, ///< Panel right of sorting options SLW_CARGOSTART, ///< Widget numbers used for list of cargo types (not present in _company_stations_widgets) }; @@ -689,16 +686,16 @@ static const NWidgetPart _nested_company_stations_widgets[] = { NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_AIRPLANE), SetMinimalSize(14, 11), SetDataTip(STR_PLANE, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1), NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_SHIP), SetMinimalSize(14, 11), SetDataTip(STR_SHIP, STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE), SetFill(0, 1), NWidget(WWT_PANEL, COLOUR_GREY, SLW_FACILALL), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_SELECT_ALL_FACILITIES), SetFill(0, 1), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, SLW_PAN_BETWEEN), SetMinimalSize(5, 11), SetDataTip(0x0, STR_NULL), SetFill(0, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(5, 11), SetFill(0, 1), EndContainer(), NWidgetFunction(CargoWidgets), NWidget(WWT_PANEL, COLOUR_GREY, SLW_NOCARGOWAITING), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_NO_WAITING_CARGO), SetFill(0, 1), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, SLW_CARGOALL), SetMinimalSize(14, 11), SetDataTip(0x0, STR_STATION_LIST_SELECT_ALL_TYPES), SetFill(0, 1), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, SLW_PAN_RIGHT), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_TEXTBTN, COLOUR_GREY, SLW_SORTBY), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), NWidget(WWT_DROPDOWN, COLOUR_GREY, SLW_SORTDROPBTN), SetMinimalSize(163, 12), SetDataTip(STR_SORT_BY_NAME, STR_TOOLTIP_SORT_CRITERIAP), // widget_data gets overwritten. - NWidget(WWT_PANEL, COLOUR_GREY, SLW_PAN_SORT_RIGHT), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY, SLW_LIST), SetMinimalSize(346, 125), SetResize(1, 10), SetDataTip(0x0, STR_STATION_LIST_TOOLTIP), EndContainer(), diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index d4bf0d9a2..c869a2bef 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -191,7 +191,6 @@ static void PlaceProc_LevelLand(TileIndex tile) /** Enum referring to the widgets of the terraform toolbar */ enum TerraformToolbarWidgets { - 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 TTW_RAISE_LAND, ///< Raise land button @@ -324,7 +323,7 @@ static const NWidgetPart _nested_terraform_widgets[] = { NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_LEVEL_LAND), SetMinimalSize(22,22), SetFill(0, 1), SetDataTip(SPR_IMG_LEVEL_LAND, STR_LANDSCAPING_LEVEL_LAND_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, TTW_SEPERATOR), SetMinimalSize(4, 22), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), EndContainer(), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_DEMOLISH), SetMinimalSize(22,22), SetFill(0, 1), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC), @@ -490,8 +489,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_BACKGROUND = ETTW_START, ///< Background of the lower part of the window - ETTW_DOTS, ///< Invisible widget for rendering the terraform size on. + ETTW_DOTS = ETTW_START, ///< Invisible widget for rendering the terraform size on. ETTW_BUTTONS_START, ///< Start of pushable buttons ETTW_DEMOLISH = ETTW_BUTTONS_START, ///< Demolish aka dynamite button ETTW_LOWER_LAND, ///< Lower land button @@ -513,7 +511,7 @@ static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = { 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(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_HORIZONTAL), SetPadding(2, 2, 7, 2), NWidget(NWID_SPACER), SetFill(1, 0), NWidget(WWT_IMGBTN, COLOUR_GREY, ETTW_DEMOLISH), SetMinimalSize(22, 22), diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 5a9dfafe8..d19b4128c 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -33,7 +33,6 @@ enum TimetableViewWindowWidgets { TTV_CLEAR_TIME, TTV_RESET_LATENESS, TTV_AUTOFILL, - TTV_EMPTY, }; /** @@ -371,7 +370,7 @@ static const NWidgetPart _nested_timetable_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, TTV_CLEAR_TIME), SetMinimalSize(110, 12), SetDataTip(STR_TIMETABLE_CLEAR_TIME, STR_TIMETABLE_CLEAR_TIME_TOOLTIP), 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_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(), NWidget(WWT_RESIZEBOX,COLOUR_GREY), EndContainer(), }; diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 8ea2a3839..cbf033115 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -296,8 +296,6 @@ static void ShowTownAuthorityWindow(uint town) /** Widget numbers of the town view window. */ enum TownViewWidgets { TVW_CAPTION, - TVW_VIEWPORTPANEL, - TVW_VIEWPORTINSET, TVW_VIEWPORT, TVW_INFOPANEL, TVW_CENTERVIEW, @@ -525,8 +523,8 @@ static const NWidgetPart _nested_town_game_view_widgets[] = { NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), 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), + NWidget(WWT_PANEL, COLOUR_BROWN), + NWidget(WWT_INSET, COLOUR_BROWN), SetPadding(2, 2, 2, 2), NWidget(NWID_VIEWPORT, INVALID_COLOUR, TVW_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetResize(1, 1), SetPadding(1, 1, 1, 1), EndContainer(), EndContainer(), @@ -555,8 +553,8 @@ static const NWidgetPart _nested_town_editor_view_widgets[] = { NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_CHANGENAME), SetMinimalSize(76, 14), SetDataTip(STR_BUTTON_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP), 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), + NWidget(WWT_PANEL, COLOUR_BROWN), + NWidget(WWT_INSET, COLOUR_BROWN), SetPadding(2, 2, 2, 2), NWidget(NWID_VIEWPORT, INVALID_COLOUR, TVW_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 1), SetResize(1, 1), SetPadding(1, 1, 1, 1), EndContainer(), EndContainer(), diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index eb9caac23..1195c4f95 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -141,7 +141,7 @@ static const NWidgetPart _nested_transparency_widgets[] = { NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_STRUCTURES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRANSMITTER, STR_TRANSPARENT_STRUCTURES_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_CATENARY), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_BUILD_X_ELRAIL, STR_TRANSPARENT_CATENARY_TOOLTIP), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_LOADING), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRAINLIST, STR_TRANSPARENT_LOADING_TOOLTIP), - NWidget(WWT_PANEL, COLOUR_DARK_GREEN, TTW_WIDGET_END), SetFill(1, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 1), EndContainer(), EndContainer(), /* Panel with 'inivisibility' buttons. */ NWidget(WWT_PANEL, COLOUR_DARK_GREEN, TTW_WIDGET_BUTTONS), SetMinimalSize(219, 13), SetDataTip(0x0, STR_TRANSPARENT_INVISIBLE_TOOLTIP), diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index 213532c94..02d07b337 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -27,7 +27,6 @@ void PlaceTreesRandomly(); /** Widget definitions for the build trees window. */ enum BuildTreesWidgets { - BTW_BACKGROUND, BTW_TYPE_11, BTW_TYPE_12, BTW_TYPE_13, @@ -168,7 +167,7 @@ static const NWidgetPart _nested_build_trees_widgets[] = { 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(WWT_PANEL, COLOUR_DARK_GREEN), NWidget(NWID_SPACER), SetMinimalSize(0, 2), NWidget(NWID_HORIZONTAL), NWidget(NWID_SPACER), SetMinimalSize(2, 0), diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index f171dd40e..84703cba0 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -705,16 +705,13 @@ enum VehicleListWindowWidgets { VLW_WIDGET_CAPTION, VLW_WIDGET_SORT_ORDER, VLW_WIDGET_SORT_BY_PULLDOWN, - VLW_WIDGET_EMPTY_TOP_RIGHT, VLW_WIDGET_LIST, VLW_WIDGET_SCROLLBAR, VLW_WIDGET_HIDE_BUTTONS, - VLW_WIDGET_OTHER_COMPANY_FILLER, VLW_WIDGET_AVAILABLE_VEHICLES, VLW_WIDGET_MANAGE_VEHICLES_DROPDOWN, VLW_WIDGET_STOP_ALL, VLW_WIDGET_START_ALL, - VLW_WIDGET_EMPTY_BOTTOM_RIGHT, }; static const NWidgetPart _nested_vehicle_list[] = { @@ -727,7 +724,7 @@ static const NWidgetPart _nested_vehicle_list[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLW_WIDGET_SORT_ORDER), SetMinimalSize(81, 12), SetFill(0, 1), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), NWidget(WWT_DROPDOWN, COLOUR_GREY, VLW_WIDGET_SORT_BY_PULLDOWN), SetMinimalSize(167, 12), SetFill(0, 1), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIAP), - NWidget(WWT_PANEL, COLOUR_GREY, VLW_WIDGET_EMPTY_TOP_RIGHT), SetMinimalSize(12, 12), SetFill(1, 1), SetResize(1, 0), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetFill(1, 1), SetResize(1, 0), EndContainer(), EndContainer(), @@ -747,10 +744,10 @@ static const NWidgetPart _nested_vehicle_list[] = { SetDataTip(SPR_FLAG_VEH_STOPPED, STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, VLW_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, VLW_WIDGET_EMPTY_BOTTOM_RIGHT), SetMinimalSize(0, 12), SetResize(1, 0), SetFill(0, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), SetFill(0, 1), EndContainer(), EndContainer(), /* 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(), + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 0), EndContainer(), EndContainer(), NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), @@ -1631,8 +1628,8 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = { NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_GREY, VVW_WIDGET_PANEL), - NWidget(WWT_INSET, COLOUR_GREY, VVW_WIDGET_INSET), SetPadding(2, 2, 2, 2), + NWidget(WWT_PANEL, COLOUR_GREY), + NWidget(WWT_INSET, COLOUR_GREY), SetPadding(2, 2, 2, 2), NWidget(NWID_VIEWPORT, INVALID_COLOUR, VVW_WIDGET_VIEWPORT), SetMinimalSize(226, 84), SetResize(1, 1), SetPadding(1, 1, 1, 1), EndContainer(), EndContainer(), @@ -1652,7 +1649,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = { EndContainer(), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, VVW_WIDGET_SHOW_ORDERS), SetFill(1, 1), SetMinimalSize(18, 18), SetDataTip(SPR_SHOW_ORDERS, 0x0 /* filled later */), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, VVW_WIDGET_SHOW_DETAILS), SetFill(1, 1), SetMinimalSize(18, 18), SetDataTip(SPR_SHOW_VEHICLE_DETAILS, 0x0 /* filled later */), - NWidget(WWT_PANEL, COLOUR_GREY, VVW_WIDGET_EMPTY_BOTTOM_RIGHT), SetFill(1, 1), SetMinimalSize(18, 0), SetResize(0, 1), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetMinimalSize(18, 0), SetResize(0, 1), EndContainer(), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index fb82d1d3b..7064fbcc1 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -24,8 +24,6 @@ void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *pare /** Constants of vehicle view widget indices */ enum VehicleViewWindowWidgets { VVW_WIDGET_CAPTION, - VVW_WIDGET_PANEL, - VVW_WIDGET_INSET, VVW_WIDGET_VIEWPORT, ///< Viewport widget. VVW_WIDGET_START_STOP_VEH, VVW_WIDGET_CENTER_MAIN_VIEH, @@ -34,7 +32,6 @@ enum VehicleViewWindowWidgets { VVW_WIDGET_SHOW_ORDERS, VVW_WIDGET_SHOW_DETAILS, VVW_WIDGET_CLONE_VEH, - 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_TURN_AROUND, diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index 91772e1e0..bce23ac71 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -24,13 +24,11 @@ /** Widget numbers of the extra viewport window. */ enum ExtraViewportWindowWidgets { EVW_CAPTION, - EVW_BACKGROUND, EVW_VIEWPORT, EVW_ZOOMIN, EVW_ZOOMOUT, EVW_MAIN_TO_VIEW, EVW_VIEW_TO_MAIN, - EVW_SPACER, }; /* Extra ViewPort Window Stuff */ @@ -40,7 +38,7 @@ static const NWidgetPart _nested_extra_view_port_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, EVW_CAPTION), SetDataTip(STR_EXTRA_VIEW_PORT_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), - NWidget(WWT_PANEL, COLOUR_GREY, EVW_BACKGROUND), + NWidget(WWT_PANEL, COLOUR_GREY), NWidget(NWID_VIEWPORT, INVALID_COLOUR, EVW_VIEWPORT), SetPadding(2, 2, 2, 2), SetResize(1, 1), SetFill(1, 1), EndContainer(), NWidget(NWID_HORIZONTAL), @@ -54,7 +52,7 @@ static const NWidgetPart _nested_extra_view_port_widgets[] = { EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_GREY, EVW_SPACER), SetFill(1, 1), SetResize(1, 0), EndContainer(), + NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 0), EndContainer(), NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index e935113b3..11ae59c1d 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -27,8 +27,6 @@ /** Widget definitions for the waypoint window. */ enum WaypointWindowWidgets { WAYPVW_CAPTION, - WAYPVW_VIEWPORTPANEL, - WAYPVW_SPACER, WAYPVW_VIEWPORT, WAYPVW_CENTERVIEW, WAYPVW_RENAME, @@ -112,6 +110,14 @@ public: ScrollWindowTo(x, y, -1, this); } + virtual void OnResize() + { + if (this->viewport != NULL) { + NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT); + nvp->UpdateViewportCoordinates(this); + } + } + virtual void OnQueryTextFinished(char *str) { if (str == NULL) return; @@ -127,15 +133,16 @@ static const NWidgetPart _nested_waypoint_view_widgets[] = { NWidget(WWT_CAPTION, COLOUR_GREY, WAYPVW_CAPTION), SetDataTip(STR_WAYPOINT_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), 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), - NWidget(NWID_VIEWPORT, COLOUR_GREY, WAYPVW_VIEWPORT), SetMinimalSize(256, 88), SetPadding(1, 1, 1, 1), + NWidget(WWT_PANEL, COLOUR_GREY), + NWidget(WWT_INSET, COLOUR_GREY), SetPadding(2, 2, 2, 2), + NWidget(NWID_VIEWPORT, COLOUR_GREY, WAYPVW_VIEWPORT), SetMinimalSize(256, 88), SetPadding(1, 1, 1, 1), SetResize(1, 1), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), - NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WAYPVW_CENTERVIEW), SetMinimalSize(100, 12), SetFill(1, 0), SetDataTip(STR_BUTTON_LOCATION, STR_BUOY_VIEW_CENTER_TOOLTIP), - NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WAYPVW_RENAME), SetMinimalSize(100, 12), SetFill(1, 0), SetDataTip(STR_BUTTON_RENAME, STR_BUOY_VIEW_CHANGE_BUOY_NAME), + NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WAYPVW_CENTERVIEW), SetMinimalSize(100, 12), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BUTTON_LOCATION, STR_BUOY_VIEW_CENTER_TOOLTIP), + NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WAYPVW_RENAME), SetMinimalSize(100, 12), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BUTTON_RENAME, STR_BUOY_VIEW_CHANGE_BUOY_NAME), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WAYPVW_SHOW_VEHICLES), SetMinimalSize(15, 12), SetDataTip(STR_SHIP, STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP), + NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), }; |