summaryrefslogtreecommitdiff
path: root/src/airport_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-09-19 11:31:12 +0000
committeralberth <alberth@openttd.org>2009-09-19 11:31:12 +0000
commit116c77c342d0f628235a7f5dbacfbb5bc3fb0829 (patch)
treed2dd74828426b0c82b4dab368e6aff5ff71f3bad /src/airport_gui.cpp
parent9d7fe9bd8688f2d4123dc98e2b222a5be70b306f (diff)
downloadopenttd-116c77c342d0f628235a7f5dbacfbb5bc3fb0829.tar.xz
(svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array.
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r--src/airport_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 739774c99..74e946640 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -223,8 +223,8 @@ public:
const AirportFTAClass *airport = GetAirport(_selected_airport_type);
int rad = _settings_game.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED;
- uint16 top = this->nested_array[BAW_BTN_DOHILIGHT]->pos_y + this->nested_array[BAW_BTN_DOHILIGHT]->current_y + WD_PAR_VSEP_NORMAL;
- NWidgetCore *panel_nwi = this->nested_array[BAW_BOTTOMPANEL];
+ uint16 top = this->GetWidget<NWidgetBase>(BAW_BTN_DOHILIGHT)->pos_y + this->GetWidget<NWidgetBase>(BAW_BTN_DOHILIGHT)->current_y + WD_PAR_VSEP_NORMAL;
+ NWidgetBase *panel_nwi = this->GetWidget<NWidgetBase>(BAW_BOTTOMPANEL);
int right = panel_nwi->pos_x + panel_nwi->current_x;
int bottom = panel_nwi->pos_y + panel_nwi->current_y;
/* only show the station (airport) noise, if the noise option is activated */