summaryrefslogtreecommitdiff
path: root/src/transparency_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/transparency_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/transparency_gui.cpp')
-rw-r--r--src/transparency_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp
index 7046f6e8c..3e454cc93 100644
--- a/src/transparency_gui.cpp
+++ b/src/transparency_gui.cpp
@@ -80,7 +80,7 @@ public:
for (uint i = TTW_WIDGET_BEGIN; i < TTW_WIDGET_END; i++) {
if (i == TTW_WIDGET_LOADING) continue; // Do not draw button for invisible loading indicators.
- const NWidgetCore *wi = this->nested_array[i];
+ const NWidgetBase *wi = this->GetWidget<NWidgetBase>(i);
DrawFrameRect(wi->pos_x + 1, r.top + 2, wi->pos_x + wi->current_x - 2, r.bottom - 2, COLOUR_PALE_GREEN,
HasBit(_invisibility_opt, i - TTW_WIDGET_BEGIN) ? FR_LOWERED : FR_NONE);
}
@@ -104,7 +104,7 @@ public:
} else if (widget == TTW_WIDGET_BUTTONS) {
uint i;
for (i = TTW_WIDGET_BEGIN; i < TTW_WIDGET_END; i++) {
- const NWidgetCore *nwid = this->nested_array[i];
+ const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(i);
if (IsInsideBS(pt.x, nwid->pos_x, nwid->current_x))
break;
}