diff options
author | alberth <alberth@openttd.org> | 2009-09-11 18:52:56 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-09-11 18:52:56 +0000 |
commit | 669b7d01acb603ebea3071b347f7b0cec8b9f505 (patch) | |
tree | 9bd9e851b4f2301fe2a880f229e76a0f63781d77 /src/osk_gui.cpp | |
parent | 4cb6451507a4ec63a7efc356ee0843f1a952e7b4 (diff) | |
download | openttd-669b7d01acb603ebea3071b347f7b0cec8b9f505.tar.xz |
(svn r17502) -Codechange [FS#3184]: Extend QueryStringBaseWindow to support windows with nested widgets (by Terkhen with a few tweaks).
Diffstat (limited to 'src/osk_gui.cpp')
-rw-r--r-- | src/osk_gui.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 7858c7f46..4aa4285f7 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -75,7 +75,13 @@ struct OskWindow : public Window { this->parent = parent; assert(parent != NULL); - this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption; + if (parent->widget != NULL) { + 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; + } this->qs = parent; this->text_btn = button; |