diff options
author | alberth <alberth@openttd.org> | 2009-09-19 11:31:12 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-09-19 11:31:12 +0000 |
commit | 116c77c342d0f628235a7f5dbacfbb5bc3fb0829 (patch) | |
tree | d2dd74828426b0c82b4dab368e6aff5ff71f3bad /src/signs_gui.cpp | |
parent | 9d7fe9bd8688f2d4123dc98e2b222a5be70b306f (diff) | |
download | openttd-116c77c342d0f628235a7f5dbacfbb5bc3fb0829.tar.xz |
(svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array.
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r-- | src/signs_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 798568f14..851957f3f 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -95,7 +95,7 @@ struct SignListWindow : Window, SignList { { this->InitNested(desc, window_number); - this->vscroll.SetCapacity((this->nested_array[SLW_LIST]->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height); + this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(SLW_LIST)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height); /* Create initial list. */ this->signs.ForceRebuild(); @@ -144,7 +144,7 @@ struct SignListWindow : Window, SignList { virtual void OnClick(Point pt, int widget) { if (widget == SLW_LIST) { - uint id_v = (pt.y - this->nested_array[SLW_LIST]->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height; + uint id_v = (pt.y - this->GetWidget<NWidgetBase>(SLW_LIST)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height; if (id_v >= this->vscroll.GetCapacity()) return; id_v += this->vscroll.GetPosition(); |