diff options
author | tron <tron@openttd.org> | 2007-01-15 07:38:36 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-15 07:38:36 +0000 |
commit | 3b22cfe70d743cde8c268d415f311a0de4e630ea (patch) | |
tree | a21d49539e63aa9ab47f2f7a1ed3317642d53fc8 | |
parent | 19bdb49e5bc34ab4434f3dc5a28ac7666f19cc33 (diff) | |
download | openttd-3b22cfe70d743cde8c268d415f311a0de4e630ea.tar.xz |
(svn r8143) Remove the landscaping button from the build toolbars.
The landscaping toolbar can be reached at least as easy directly from the main toolbar.
Further two of the four toolbars uses 'l' as keyboard shortcut for this button, which plain does not work (The letter has to be uppercase).
This was covered by the fact there is a global shortcut 'L' to open the landscaping toolbar, so the individual checks in the four build toolbars were redundant anyway.
-rw-r--r-- | src/airport_gui.cpp | 13 | ||||
-rw-r--r-- | src/dock_gui.cpp | 15 | ||||
-rw-r--r-- | src/rail_gui.cpp | 16 | ||||
-rw-r--r-- | src/road_gui.cpp | 15 |
4 files changed, 15 insertions, 44 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index adfd6849c..be9a8223c 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -57,16 +57,11 @@ static void BuildAirClick_Demolish(Window *w) HandlePlacePushButton(w, ATW_DEMOLISH, ANIMCURSOR_DEMOLISH, 1, PlaceAir_DemolishArea); } -static void BuildAirClick_Landscaping(Window *w) -{ - ShowTerraformToolbar(); -} typedef void OnButtonClick(Window *w); static OnButtonClick * const _build_air_button_proc[] = { BuildAirClick_Airport, BuildAirClick_Demolish, - BuildAirClick_Landscaping, }; static void BuildAirToolbWndProc(Window *w, WindowEvent *e) @@ -85,7 +80,6 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e) switch (e->we.keypress.keycode) { case '1': BuildAirClick_Airport(w); break; case '2': BuildAirClick_Demolish(w); break; - case 'l': BuildAirClick_Landscaping(w); break; default: return; } } break; @@ -120,17 +114,16 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e) static const Widget _air_toolbar_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON }, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 51, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 52, 63, 0, 13, 0x0, STR_STICKY_BUTTON }, { WWT_IMGBTN, RESIZE_NONE, 7, 0, 41, 14, 35, SPR_IMG_AIRPORT, STR_A01E_BUILD_AIRPORT }, { WWT_IMGBTN, RESIZE_NONE, 7, 42, 63, 14, 35, SPR_IMG_DYNAMITE, STR_018D_DEMOLISH_BUILDINGS_ETC }, -{ WWT_IMGBTN, RESIZE_NONE, 7, 64, 85, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP }, { WIDGETS_END}, }; static const WindowDesc _air_toolbar_desc = { - WDP_ALIGN_TBR, 22, 86, 36, + WDP_ALIGN_TBR, 22, 64, 36, WC_BUILD_TOOLBAR, 0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, _air_toolbar_widgets, diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 89137396d..1997a5a3d 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -105,10 +105,6 @@ static void BuildDocksClick_Buoy(Window *w) HandlePlacePushButton(w, DTW_BUOY, SPR_CURSOR_BOUY, 1, PlaceDocks_Buoy); } -static void BuildDocksClick_Landscaping(Window *w) -{ - ShowTerraformToolbar(); -} typedef void OnButtonClick(Window *w); static OnButtonClick * const _build_docks_button_proc[] = { @@ -118,8 +114,7 @@ static OnButtonClick * const _build_docks_button_proc[] = { BuildDocksClick_Demolish, BuildDocksClick_Depot, BuildDocksClick_Dock, - BuildDocksClick_Buoy, - BuildDocksClick_Landscaping, + BuildDocksClick_Buoy }; static void BuildDocksToolbWndProc(Window *w, WindowEvent *e) @@ -141,7 +136,6 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e) case '4': BuildDocksClick_Depot(w); break; case '5': BuildDocksClick_Dock(w); break; case '6': BuildDocksClick_Buoy(w); break; - case 'l': BuildDocksClick_Landscaping(w); break; default: return; } break; @@ -198,8 +192,8 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e) static const Widget _build_docks_toolb_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 145, 0, 13, STR_9801_DOCK_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 146, 157, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 123, 0, 13, STR_9801_DOCK_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 124, 135, 0, 13, 0x0, STR_STICKY_BUTTON}, { WWT_IMGBTN, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_BUILD_CANAL, STR_BUILD_CANALS_TIP}, { WWT_IMGBTN, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_BUILD_LOCK, STR_BUILD_LOCKS_TIP}, @@ -209,12 +203,11 @@ static const Widget _build_docks_toolb_widgets[] = { { WWT_IMGBTN, RESIZE_NONE, 7, 70, 91, 14, 35, SPR_IMG_SHIP_DEPOT, STR_981E_BUILD_SHIP_DEPOT_FOR_BUILDING}, { WWT_IMGBTN, RESIZE_NONE, 7, 92, 113, 14, 35, SPR_IMG_SHIP_DOCK, STR_981D_BUILD_SHIP_DOCK}, { WWT_IMGBTN, RESIZE_NONE, 7, 114, 135, 14, 35, SPR_IMG_BOUY, STR_9834_POSITION_BUOY_WHICH_CAN}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 136, 157, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; static const WindowDesc _build_docks_toolbar_desc = { - WDP_ALIGN_TBR, 22, 158, 36, + WDP_ALIGN_TBR, 22, 136, 36, WC_BUILD_TOOLBAR, 0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, _build_docks_toolb_widgets, diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 357ccfaea..2d08dfeab 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -333,10 +333,6 @@ static void BuildRailClick_Convert(Window *w) HandlePlacePushButton(w, RTW_CONVERT_RAIL, GetRailTypeInfo(_cur_railtype)->cursor.convert, 1, PlaceRail_ConvertRail); } -static void BuildRailClick_Landscaping(Window *w) -{ - ShowTerraformToolbar(); -} static void DoRailroadTrack(int mode) { @@ -400,8 +396,7 @@ static OnButtonClick * const _build_railroad_button_proc[] = { BuildRailClick_Bridge, BuildRailClick_Tunnel, BuildRailClick_Remove, - BuildRailClick_Convert, - BuildRailClick_Landscaping, + BuildRailClick_Convert }; static const uint16 _rail_keycodes[] = { @@ -419,7 +414,6 @@ static const uint16 _rail_keycodes[] = { 'T', // tunnel 'R', // remove 'C', // convert rail - 'L', // landscaping }; @@ -547,8 +541,8 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e) static const Widget _build_rail_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 359, 0, 13, STR_100A_RAILROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 360, 371, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 337, 0, 13, STR_100A_RAILROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 338, 349, 0, 13, 0x0, STR_STICKY_BUTTON}, { WWT_PANEL, RESIZE_NONE, 7, 110, 113, 14, 35, 0x0, STR_NULL}, @@ -569,13 +563,11 @@ static const Widget _build_rail_widgets[] = { { WWT_IMGBTN, RESIZE_NONE, 7, 306, 327, 14, 35, SPR_IMG_REMOVE, STR_101E_TOGGLE_BUILD_REMOVE_FOR}, { WWT_IMGBTN, RESIZE_NONE, 7, 328, 349, 14, 35, SPR_IMG_CONVERT_RAIL, STR_CONVERT_RAIL_TIP}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 350, 371, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, - { WIDGETS_END}, }; static const WindowDesc _build_rail_desc = { - WDP_ALIGN_TBR, 22, 372, 36, + WDP_ALIGN_TBR, 22, 350, 36, WC_BUILD_TOOLBAR, 0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, _build_rail_widgets, diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 36b6d516f..951526e3b 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -176,10 +176,6 @@ static void BuildRoadClick_Remove(Window *w) SetSelectionRed(IsWindowWidgetLowered(w, RTW_REMOVE)); } -static void BuildRoadClick_Landscaping(Window *w) -{ - ShowTerraformToolbar(); -} static OnButtonClick* const _build_road_button_proc[] = { BuildRoadClick_NE, @@ -190,8 +186,7 @@ static OnButtonClick* const _build_road_button_proc[] = { BuildRoadClick_TruckStation, BuildRoadClick_Bridge, BuildRoadClick_Tunnel, - BuildRoadClick_Remove, - BuildRoadClick_Landscaping, + BuildRoadClick_Remove }; static void BuildRoadToolbWndProc(Window *w, WindowEvent *e) @@ -221,7 +216,6 @@ static void BuildRoadToolbWndProc(Window *w, WindowEvent *e) case 'B': BuildRoadClick_Bridge(w); break; case 'T': BuildRoadClick_Tunnel(w); break; case 'R': BuildRoadClick_Remove(w); break; - case 'L': BuildRoadClick_Landscaping(w); break; default: return; } MarkTileDirty(_thd.pos.x, _thd.pos.y); // redraw tile selection @@ -307,8 +301,8 @@ static void BuildRoadToolbWndProc(Window *w, WindowEvent *e) static const Widget _build_road_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 227, 0, 13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_STICKYBOX, RESIZE_NONE, 7, 228, 239, 0, 13, 0x0, STR_STICKY_BUTTON}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 205, 0, 13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_STICKYBOX, RESIZE_NONE, 7, 206, 217, 0, 13, 0x0, STR_STICKY_BUTTON}, { WWT_IMGBTN, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_ROAD_NW, STR_180B_BUILD_ROAD_SECTION}, { WWT_IMGBTN, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_ROAD_NE, STR_180B_BUILD_ROAD_SECTION}, @@ -319,12 +313,11 @@ static const Widget _build_road_widgets[] = { { WWT_IMGBTN, RESIZE_NONE, 7, 132, 173, 14, 35, SPR_IMG_BRIDGE, STR_180F_BUILD_ROAD_BRIDGE}, { WWT_IMGBTN, RESIZE_NONE, 7, 174, 195, 14, 35, SPR_IMG_ROAD_TUNNEL, STR_1810_BUILD_ROAD_TUNNEL}, { WWT_IMGBTN, RESIZE_NONE, 7, 196, 217, 14, 35, SPR_IMG_REMOVE, STR_1811_TOGGLE_BUILD_REMOVE_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 7, 218, 239, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, { WIDGETS_END}, }; static const WindowDesc _build_road_desc = { - WDP_ALIGN_TBR, 22, 240, 36, + WDP_ALIGN_TBR, 22, 218, 36, WC_BUILD_TOOLBAR, 0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, _build_road_widgets, |