Mercurial > hg > openttd
diff src/transparency_gui.cpp @ 13072:75bd67594af2 draft
(svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array.
author | alberth <alberth@openttd.org> |
---|---|
date | Sat, 19 Sep 2009 11:31:12 +0000 |
parents | 6eb3f749890a |
children | afdfdda87cd4 |
line wrap: on
line diff
--- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -80,7 +80,7 @@ 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 @@ } 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; }