diff options
-rw-r--r-- | aircraft_gui.c | 12 | ||||
-rw-r--r-- | airport_gui.c | 47 | ||||
-rw-r--r-- | dock_gui.c | 12 | ||||
-rw-r--r-- | main_gui.c | 2 | ||||
-rw-r--r-- | news_gui.c | 2 | ||||
-rw-r--r-- | road_gui.c | 21 | ||||
-rw-r--r-- | roadveh_gui.c | 13 | ||||
-rw-r--r-- | ship_gui.c | 12 | ||||
-rw-r--r-- | train_gui.c | 12 | ||||
-rw-r--r-- | widget.c | 2 | ||||
-rw-r--r-- | window.h | 2 |
11 files changed, 69 insertions, 68 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index 1bb138e0b..c562de46d 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -273,7 +273,6 @@ static void AircraftRefitWndProc(Window *w, WindowEvent *e) SetDParam(1, v->unitnumber); DrawWindowWidgets(w); - DrawString(1, 15, STR_A040_SELECT_CARGO_TYPE_TO_CARRY, 0); /* TODO: Support for custom GRFSpecial-specified refitting! --pasky */ WP(w,refit_d).cargo = DrawVehicleRefitWindow(v, WP(w, refit_d).sel); @@ -311,11 +310,12 @@ static void AircraftRefitWndProc(Window *w, WindowEvent *e) } static const Widget _aircraft_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A03C_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 145, 0x0, STR_A03E_SELECT_TYPE_OF_CARGO_FOR }, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 146, 167, 0x0, STR_NULL }, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 168, 179, STR_A03D_REFIT_AIRCRAFT, STR_A03F_REFIT_AIRCRAFT_TO_CARRY }, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A03C_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 145, 0x0, STR_A03E_SELECT_TYPE_OF_CARGO_FOR }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 146, 167, 0x0, STR_NULL }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 168, 179, STR_A03D_REFIT_AIRCRAFT, STR_A03F_REFIT_AIRCRAFT_TO_CARRY }, +{ WWT_LABEL, RESIZE_NONE, 0, 0, 239, 13, 26, STR_A040_SELECT_CARGO_TYPE_TO_CARRY, STR_NULL}, { WIDGETS_END}, }; diff --git a/airport_gui.c b/airport_gui.c index 259119f9c..e2927c767 100644 --- a/airport_gui.c +++ b/airport_gui.c @@ -186,11 +186,7 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) DrawWindowWidgets(w); // strings such as 'Size' and 'Coverage Area' - DrawStringCentered(74, 16, STR_SMALL_AIRPORTS, 0); - DrawStringCentered(74, 54, STR_LARGE_AIRPORTS, 0); - DrawStringCentered(74, 92, STR_HUB_AIRPORTS, 0); - DrawStringCentered(74, 130, STR_HELIPORTS, 0); - DrawStringCentered(74, 180, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); + // 'Coverage Area' DrawStationCoverageAreaText(2, 206, (uint)-1, rad); break; } @@ -226,24 +222,29 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) } static const Widget _build_airport_picker_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3001_AIRPORT_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 52, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 53, 89, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 90, 127, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 128, 177, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 178, 239, 0x0, STR_NULL}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 27, 38, STR_SMALL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 65, 76, STR_CITY_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 141, 152, STR_HELIPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 77, 88, STR_METRO_AIRPORT , STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 103, 114, STR_INTERNATIONAL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 39, 50, STR_COMMUTER_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 165, 176, STR_HELIDEPOT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 115, 126, STR_INTERCONTINENTAL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 153, 164, STR_HELISTATION, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 191, 202, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 191, 202, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3001_AIRPORT_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 52, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 53, 89, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 90, 127, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 128, 177, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 178, 239, 0x0, STR_NULL}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 27, 38, STR_SMALL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 65, 76, STR_CITY_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 141, 152, STR_HELIPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 77, 88, STR_METRO_AIRPORT , STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 103, 114, STR_INTERNATIONAL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 39, 50, STR_COMMUTER_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 165, 176, STR_HELIDEPOT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 115, 126, STR_INTERCONTINENTAL_AIRPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 153, 164, STR_HELISTATION, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 191, 202, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 191, 202, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 14, 27, STR_SMALL_AIRPORTS, STR_NULL}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 52, 65, STR_LARGE_AIRPORTS, STR_NULL}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 90, 103, STR_HUB_AIRPORTS, STR_NULL}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 128, 141, STR_HELIPORTS, STR_NULL}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 178, 191, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL}, { WIDGETS_END}, }; diff --git a/dock_gui.c b/dock_gui.c index 8e3b3b84b..aa51caeb0 100644 --- a/dock_gui.c +++ b/dock_gui.c @@ -239,7 +239,6 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e) SetTileSelectBigSize(0, 0, 0, 0); } - DrawStringCentered(74, 17, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); DrawStationCoverageAreaText(4, 50, (uint)-1, rad); break; } @@ -271,11 +270,12 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e) } static const Widget _build_dock_station_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3068_DOCK, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 74, 0x0, STR_NULL}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 30, 40, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 30, 40, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3068_DOCK, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 74, 0x0, STR_NULL}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 30, 40, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 74, 133, 30, 40, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 17, 30, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL}, { WIDGETS_END}, }; diff --git a/main_gui.c b/main_gui.c index 27fa04fe8..365d9b306 100644 --- a/main_gui.c +++ b/main_gui.c @@ -1394,6 +1394,7 @@ static const Widget _scen_edit_town_gen_widgets[] = { { WWT_TEXTBTN, RESIZE_NONE, 14, 2, 53, 68, 79, STR_02A1_SMALL, STR_02A4_SELECT_TOWN_SIZE}, { WWT_TEXTBTN, RESIZE_NONE, 14, 54, 105, 68, 79, STR_02A2_MEDIUM, STR_02A4_SELECT_TOWN_SIZE}, { WWT_TEXTBTN, RESIZE_NONE, 14, 106, 157, 68, 79, STR_02A3_LARGE, STR_02A4_SELECT_TOWN_SIZE}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 147, 54, 67, STR_02A5_TOWN_SIZE, STR_NULL}, { WIDGETS_END}, }; @@ -1402,7 +1403,6 @@ static void ScenEditTownGenWndProc(Window *w, WindowEvent *e) switch (e->event) { case WE_PAINT: DrawWindowWidgets(w); - DrawStringCentered(80, 56, STR_02A5_TOWN_SIZE, 0); break; case WE_CREATE: diff --git a/news_gui.c b/news_gui.c index e3e739d7d..1af619339 100644 --- a/news_gui.c +++ b/news_gui.c @@ -731,7 +731,6 @@ static void MessageOptionsWndProc(Window *w, WindowEvent *e) if (_news_ticker_sound) SETBIT(w->click_state, 25); DrawWindowWidgets(w); - DrawStringCentered(185, 15, STR_0205_MESSAGE_TYPES, 0); /* XXX - Draw the fake widgets-buttons. Can't add these to the widget-desc since * openttd currently can only handle 32 widgets. So hack it *g* */ @@ -839,6 +838,7 @@ static const Widget _message_options_widgets[] = { { WWT_TEXTBTN, RESIZE_NONE, 3, 87, 98, 154, 165, STR_0225, STR_NULL}, { WWT_4, RESIZE_NONE, 3, 4, 98, 166, 177, STR_02DB_OFF, STR_NULL}, +{ WWT_LABEL, RESIZE_NONE, 13, 0, 409, 13, 26, STR_0205_MESSAGE_TYPES, STR_NULL}, { WIDGETS_END}, }; diff --git a/road_gui.c b/road_gui.c index c70bcb562..c8c4fb8f0 100644 --- a/road_gui.c +++ b/road_gui.c @@ -430,7 +430,6 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e) StationPickerDrawSprite(35, 85, 0, image+2); StationPickerDrawSprite(35, 35, 0, image+3); - DrawStringCentered(70, 120, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); DrawStationCoverageAreaText(2, 146, ((w->window_class == WC_BUS_STATION) ? (1<<CT_PASSENGERS) : ~(1<<CT_PASSENGERS)), 3); @@ -477,6 +476,7 @@ static const Widget _bus_station_picker_widgets[] = { { WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3051_SELECT_BUS_STATION_ORIENTATION}, { WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, { WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 139, 120, 133, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL}, { WIDGETS_END}, }; @@ -494,15 +494,16 @@ static void ShowBusStationPicker(void) } static const Widget _truck_station_picker_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_3043_TRUCK_STATION_ORIENT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, -{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 7, 11, 139, 0, 13, STR_3043_TRUCK_STATION_ORIENT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 7, 0, 139, 14, 176, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 71, 136, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 69, 118, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_PANEL, RESIZE_NONE, 14, 3, 68, 17, 66, 0x0, STR_3052_SELECT_TRUCK_LOADING_BAY}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 10, 69, 133, 144, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, +{ WWT_TEXTBTN, RESIZE_NONE, 14, 70, 129, 133, 144, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, +{ WWT_LABEL, RESIZE_NONE, 7, 0, 139, 120, 133, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL}, { WIDGETS_END}, }; diff --git a/roadveh_gui.c b/roadveh_gui.c index 9a2a7515a..f47274091 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -89,8 +89,6 @@ static void RoadVehRefitWndProc(Window *w, WindowEvent *e) SetDParam(1, v->unitnumber); DrawWindowWidgets(w); - DrawString(1, 15, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, 0); - WP(w,refit_d).cargo = DrawVehicleRefitWindow(v, WP(w,refit_d).sel); if (WP(w,refit_d).cargo != CT_INVALID) { @@ -130,11 +128,12 @@ static void RoadVehRefitWndProc(Window *w, WindowEvent *e) } static const Widget _road_veh_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS }, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR }, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL }, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_REFIT_ROAD_VEHICLE, STR_REFIT_ROAD_VEHICLE_TO_CARRY_HIGHLIGHTED }, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR }, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL }, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_REFIT_ROAD_VEHICLE, STR_REFIT_ROAD_VEHICLE_TO_CARRY_HIGHLIGHTED }, +{ WWT_LABEL, RESIZE_NONE, 0, 0, 239, 13, 26, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, STR_NULL}, { WIDGETS_END }, }; diff --git a/ship_gui.c b/ship_gui.c index d232f23a9..b10496446 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -88,7 +88,6 @@ static void ShipRefitWndProc(Window *w, WindowEvent *e) SetDParam(1, v->unitnumber); DrawWindowWidgets(w); - DrawString(1, 15, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, 0); /* TODO: Support for custom GRFSpecial-specified refitting! --pasky */ WP(w,refit_d).cargo = DrawVehicleRefitWindow(v, WP(w, refit_d).sel);; @@ -127,11 +126,12 @@ static void ShipRefitWndProc(Window *w, WindowEvent *e) static const Widget _ship_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_983C_REFIT_SHIP, STR_983E_REFIT_SHIP_TO_CARRY_HIGHLIGHTED}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_983D_SELECT_TYPE_OF_CARGO_FOR}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_983C_REFIT_SHIP, STR_983E_REFIT_SHIP_TO_CARRY_HIGHLIGHTED}, +{ WWT_LABEL, RESIZE_NONE, 0, 0, 239, 13, 26, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, STR_NULL}, { WIDGETS_END}, }; diff --git a/train_gui.c b/train_gui.c index f9b3ee520..2070a7448 100644 --- a/train_gui.c +++ b/train_gui.c @@ -829,7 +829,6 @@ static void RailVehicleRefitWndProc(Window *w, WindowEvent *e) SetDParam(1, v->unitnumber); DrawWindowWidgets(w); - DrawString(1, 15, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, 0); /* TODO: Support for custom GRFSpecial-specified refitting! --pasky */ WP(w,refit_d).cargo = DrawVehicleRefitWindow(v, WP(w, refit_d).sel); @@ -868,11 +867,12 @@ static void RailVehicleRefitWndProc(Window *w, WindowEvent *e) static const Widget _rail_vehicle_refit_widgets[] = { -{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_RAIL_SELECT_TYPE_OF_CARGO_FOR}, -{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_RAIL_REFIT_VEHICLE, STR_RAIL_REFIT_TO_CARRY_HIGHLIGHTED}, +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_983B_REFIT, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 14, 135, 0x0, STR_RAIL_SELECT_TYPE_OF_CARGO_FOR}, +{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 239, 136, 157, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 239, 158, 169, STR_RAIL_REFIT_VEHICLE, STR_RAIL_REFIT_TO_CARRY_HIGHLIGHTED}, +{ WWT_LABEL, RESIZE_NONE, 0, 0, 239, 13, 26, STR_983F_SELECT_CARGO_TYPE_TO_CARRY, STR_NULL}, { WIDGETS_END}, }; @@ -197,7 +197,7 @@ void DrawWindowWidgets(const Window *w) } /* fall through */ - case WWT_5: { + case WWT_LABEL: { StringID str = wi->unkA; if ((wi->type&WWT_MASK) == WWT_4 && clicked) str++; @@ -538,7 +538,7 @@ enum WindowWidgetTypes { WWT_TEXTBTN = 3, /* button with text */ WWT_4 = 4, /* button with diff text when clicked */ - WWT_5 = 5, /* label */ + WWT_LABEL = 5, /* centered label */ WWT_6 = 6, /* combo box text area */ WWT_MATRIX = 7, WWT_SCROLLBAR = 8, |