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/osk_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/osk_gui.cpp')
-rw-r--r-- | src/osk_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 4d423ee81..e209ed1a6 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -79,8 +79,9 @@ struct OskWindow : public Window { this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption; } if (parent->nested_array != NULL) { - assert(parent->nested_array[button] != NULL); - this->caption = (parent->nested_array[button]->widget_data != STR_NULL) ? parent->nested_array[button]->widget_data : parent->caption; + NWidgetCore *par_wid = parent->GetWidget<NWidgetCore>(button); + assert(par_wid != NULL); + this->caption = (par_wid->widget_data != STR_NULL) ? par_wid->widget_data : parent->caption; } this->qs = parent; |