Mercurial > hg > openttd
changeset 886:164bb535c49f draft
(svn r1372) -Fix: fixed some GUI glitches introduced with resize-buttons
author | truelight <truelight@openttd.org> |
---|---|
date | Tue, 04 Jan 2005 15:49:30 +0000 |
parents | 6aa3635b17b2 |
children | ff9a6b68df92 |
files | aircraft_gui.c roadveh_gui.c ship_gui.c train_gui.c |
diffstat | 4 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -941,7 +941,7 @@ { WWT_PANEL, RESIZE_RIGHT, 14, 244, 259, 14, 25, 0x0, STR_NULL}, { WWT_MATRIX, RESIZE_RB, 14, 0, 248, 26, 169, 0x401, STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 249, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 249, 248, 170, 181, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 248, 170, 181, 0x0, STR_NULL}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 249, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -1058,6 +1058,9 @@ case 9: { /* Build new Vehicle */ uint tile; + if (!IsWindowOfPrototype(w, _player_aircraft_widgets)) + break; + tile = _last_built_aircraft_depot_tile; do { if (_map_owner[tile] == _local_player && IsAircraftHangarTile(tile)) { @@ -1073,6 +1076,9 @@ } break; case 10: + if (!IsWindowOfPrototype(w, _player_aircraft_widgets)) + break; + ShowReplaceVehicleWindow(VEH_Aircraft); break;
--- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -762,7 +762,7 @@ { WWT_PANEL, RESIZE_RIGHT, 14, 244, 259, 14, 25, 0x0, STR_NULL}, { WWT_MATRIX, RESIZE_RB, 14, 0, 248, 26, 207, 0x701, STR_901A_ROAD_VEHICLES_CLICK_ON}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 249, 259, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 0, 247, 208, 219, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 248, 208, 219, 0x0, STR_NULL}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 249, 259, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -893,6 +893,9 @@ ShowBuildRoadVehWindow(0); } break; case 10: { + if (!IsWindowOfPrototype(w, _player_roadveh_widgets)) + break; + ShowReplaceVehicleWindow(VEH_Road); break; }
--- a/ship_gui.c +++ b/ship_gui.c @@ -924,7 +924,7 @@ { WWT_PANEL, RESIZE_RIGHT, 14, 244, 259, 14, 25, 0x0, STR_NULL}, { WWT_MATRIX, RESIZE_RB, 14, 0, 248, 26, 169, 0x401, STR_9823_SHIPS_CLICK_ON_SHIP_FOR}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 249, 259, 26, 169, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_RTB, 14, 249, 248, 170, 181, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 248, 170, 181, 0x0, STR_NULL}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 249, 259, 170, 181, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -1058,6 +1058,9 @@ } break; case 10: { + if (!IsWindowOfPrototype(w, _player_ships_widgets)) + break; + ShowReplaceVehicleWindow(VEH_Ship); break; }
--- a/train_gui.c +++ b/train_gui.c @@ -1234,7 +1234,7 @@ { WWT_PANEL, RESIZE_RIGHT, 14, 244, 324, 14, 25, 0x0, STR_NULL}, { WWT_MATRIX, RESIZE_RB, 14, 0, 313, 26, 207, 0x701, STR_883D_TRAINS_CLICK_ON_TRAIN_FOR}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 314, 324, 26, 207, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, -{ WWT_PANEL, RESIZE_TB, 14, 0, 312, 208, 219, 0x0, STR_NULL}, +{ WWT_PANEL, RESIZE_RTB, 14, 0, 313, 208, 219, 0x0, STR_NULL}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 314, 324, 208, 219, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; @@ -1368,6 +1368,9 @@ ShowBuildTrainWindow(0); } break; case 10: { + if (!IsWindowOfPrototype(w, _player_trains_widgets)) + break; + ShowReplaceVehicleWindow(VEH_Train); break; }