summaryrefslogtreecommitdiff
path: root/src/waypoint_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/waypoint_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/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index cc35f129a..e08066dfe 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -52,14 +52,14 @@ public:
this->CreateNestedTree(desc);
if (this->vt == VEH_TRAIN) {
- this->nested_array[WAYPVW_SHOW_VEHICLES]->SetDataTip(STR_TRAIN, STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP);
- this->nested_array[WAYPVW_CENTERVIEW]->tool_tip = STR_WAYPOINT_VIEW_CENTER_TOOLTIP;
- this->nested_array[WAYPVW_RENAME]->tool_tip = STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME;
+ this->GetWidget<NWidgetCore>(WAYPVW_SHOW_VEHICLES)->SetDataTip(STR_TRAIN, STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP);
+ this->GetWidget<NWidgetCore>(WAYPVW_CENTERVIEW)->tool_tip = STR_WAYPOINT_VIEW_CENTER_TOOLTIP;
+ this->GetWidget<NWidgetCore>(WAYPVW_RENAME)->tool_tip = STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME;
}
this->FinishInitNested(desc, window_number);
this->flags4 |= WF_DISABLE_VP_SCROLL;
- NWidgetViewport *nvp = (NWidgetViewport *)this->nested_array[WAYPVW_VIEWPORT];
+ NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
nvp->InitializeViewport(this, this->wp->xy, ZOOM_LVL_MIN);
this->OnInvalidateData(0);