diff options
-rw-r--r-- | aircraft_gui.c | 14 | ||||
-rw-r--r-- | roadveh_gui.c | 14 | ||||
-rw-r--r-- | ship_gui.c | 4 | ||||
-rw-r--r-- | vehicle_gui.c | 16 |
4 files changed, 30 insertions, 18 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index 31d9a181f..7a683f7fc 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -74,6 +74,10 @@ void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number) SetDParam(0, e->reliability * 100 >> 16); DrawString(x, y, STR_PURCHASE_INFO_RELIABILITY, 0); y += 10; + + /* Additional text from NewGRF */ + // XXX 227 will become a calculated width... + y += ShowAdditionalText(x, y, 227, engine_number); } static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection) @@ -223,15 +227,15 @@ static const Widget _new_aircraft_widgets[] = { { WWT_CAPTION, RESIZE_NONE, 14, 11, 239, 0, 13, STR_A005_NEW_AIRCRAFT, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 227, 14, 109, 0x401, STR_A025_AIRCRAFT_SELECTION_LIST}, { WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 228, 239, 14, 109, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_TB, 14, 0, 239, 110, 161, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 162, 173, STR_A006_BUILD_AIRCRAFT, STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 115, 227, 162, 173, STR_A037_RENAME, STR_A038_RENAME_AIRCRAFT_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 228, 239, 162, 173, 0x0, STR_RESIZE_BUTTON}, +{ WWT_IMGBTN, RESIZE_TB, 14, 0, 239, 110, 181, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 182, 193, STR_A006_BUILD_AIRCRAFT, STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 115, 227, 182, 193, STR_A037_RENAME, STR_A038_RENAME_AIRCRAFT_TYPE}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 228, 239, 182, 193, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const WindowDesc _new_aircraft_desc = { - -1, -1, 240, 174, + -1, -1, 240, 194, WC_BUILD_VEHICLE,0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, _new_aircraft_widgets, diff --git a/roadveh_gui.c b/roadveh_gui.c index b1434844c..18b4a0720 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -62,6 +62,10 @@ void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number) SetDParam(0, e->reliability * 100 >> 16); DrawString(x, y, STR_PURCHASE_INFO_RELIABILITY, 0); y += 10; + + /* Additional text from NewGRF */ + // XXX 227 will become a calculated width... + y += ShowAdditionalText(x, y, 227, engine_number); } static void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection) @@ -579,15 +583,15 @@ static const Widget _new_road_veh_widgets[] = { { WWT_CAPTION, RESIZE_NONE, 14, 11, 247, 0, 13, STR_9006_NEW_ROAD_VEHICLES, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 235, 14, 125, 0x801, STR_9026_ROAD_VEHICLE_SELECTION}, { WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 236, 247, 14, 125, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_IMGBTN, RESIZE_TB, 14, 0, 247, 126, 177, 0x0, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 117, 178, 189, STR_9007_BUILD_VEHICLE,STR_9027_BUILD_THE_HIGHLIGHTED_ROAD}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 118, 235, 178, 189, STR_9034_RENAME, STR_9035_RENAME_ROAD_VEHICLE_TYPE}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 236, 247, 178, 189, 0x0, STR_RESIZE_BUTTON}, +{ WWT_IMGBTN, RESIZE_TB, 14, 0, 247, 126, 197, 0x0, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 117, 198, 209, STR_9007_BUILD_VEHICLE,STR_9027_BUILD_THE_HIGHLIGHTED_ROAD}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 118, 235, 198, 209, STR_9034_RENAME, STR_9035_RENAME_ROAD_VEHICLE_TYPE}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 236, 247, 198, 209, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; static const WindowDesc _new_road_veh_desc = { - -1, -1, 248, 190, + -1, -1, 248, 210, WC_BUILD_VEHICLE,0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, _new_road_veh_widgets, diff --git a/ship_gui.c b/ship_gui.c index 93cd990f1..69b53fd38 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -62,6 +62,10 @@ void DrawShipPurchaseInfo(int x, int y, EngineID engine_number) SetDParam(0, e->reliability * 100 >> 16); DrawString(x,y, STR_PURCHASE_INFO_RELIABILITY, 0); y += 10; + + /* Additional text from NewGRF */ + // XXX 227 will become a calculated width... + y += ShowAdditionalText(x, y, 227, engine_number); } static void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection) diff --git a/vehicle_gui.c b/vehicle_gui.c index 967b6ae60..743b4e810 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -903,7 +903,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) SetDParam(0, STR_NOT_REPLACING_VEHICLE_SELECTED); } - DrawString(145, (w->resize.step_height == 24 ? 67 : 87) + w->resize.step_height * w->vscroll.cap, STR_02BD, 0x10); + DrawString(145, 87 + w->resize.step_height * w->vscroll.cap, STR_02BD, 0x10); /* now we draw the two arrays according to what we just counted */ DrawEngineArrayInReplaceWindow(w, x, y, x2, y2, pos, pos2, sel[0], sel[1], selected_id[0], selected_id[1]); @@ -1081,16 +1081,16 @@ static const Widget _replace_ship_aircraft_vehicle_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 110, 161, STR_NULL, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 162, 173, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, -{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 162, 173, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 306, 443, 162, 173, STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON}, +{ WWT_PANEL, RESIZE_TB, 14, 0, 227, 110, 181, STR_NULL, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 182, 193, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, +{ WWT_PANEL, RESIZE_TB, 14, 139, 305, 182, 193, STR_NULL, STR_REPLACE_HELP_REPLACE_INFO_TAB}, +{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 306, 443, 182, 193, STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON}, { WWT_MATRIX, RESIZE_BOTTOM, 14, 0, 215, 14, 109, 0x401, STR_REPLACE_HELP_LEFT_ARRAY}, { WWT_SCROLLBAR, RESIZE_BOTTOM, 14, 216, 227, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WWT_MATRIX, RESIZE_BOTTOM, 14, 228, 443, 14, 109, 0x401, STR_REPLACE_HELP_RIGHT_ARRAY}, { WWT_SCROLL2BAR, RESIZE_BOTTOM, 14, 444, 455, 14, 109, STR_NULL, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 110, 161, STR_NULL, STR_NULL}, -{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 162, 173, STR_NULL, STR_RESIZE_BUTTON}, +{ WWT_PANEL, RESIZE_TB, 14, 228, 455, 110, 181, STR_NULL, STR_NULL}, +{ WWT_RESIZEBOX, RESIZE_TB, 14, 444, 455, 182, 193, STR_NULL, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -1111,7 +1111,7 @@ static const WindowDesc _replace_road_vehicle_desc = { }; static const WindowDesc _replace_ship_aircraft_vehicle_desc = { - -1, -1, 456, 174, + -1, -1, 456, 194, WC_REPLACE_VEHICLE,0, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, _replace_ship_aircraft_vehicle_widgets, |