summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-04 15:35:36 +0000
committeralberth <alberth@openttd.org>2009-07-04 15:35:36 +0000
commitd65c6cae545f36e7f25efcee0b28bbfac7d64769 (patch)
tree88411cfe473c05b2abb2c6afdce7932f660312cd /src/window.cpp
parent2385aeae3c3b065fac37724334469f1ed9ea29f3 (diff)
downloadopenttd-d65c6cae545f36e7f25efcee0b28bbfac7d64769.tar.xz
(svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 8aaa78d69..29aec3ab3 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -574,7 +574,7 @@ void Window::ReInit()
int window_height = this->height;
/* Re-initialize the window from the ground up. No need to change the nested_array, as all widgets stay where they are. */
- this->nested_root->SetupSmallestSize();
+ this->nested_root->SetupSmallestSize(this);
this->nested_root->AssignSizePosition(ST_SMALLEST, 0, 0, this->nested_root->smallest_x, this->nested_root->smallest_y, false, false, false);
this->width = this->nested_root->smallest_x;
this->height = this->nested_root->smallest_y;
@@ -884,7 +884,7 @@ void Window::Initialize(int x, int y, int min_width, int min_height,
if (nested_root != NULL) {
this->nested_root = nested_root;
/* Setup nested_array pointers into the tree. */
- int biggest_index = this->nested_root->SetupSmallestSize();
+ int biggest_index = this->nested_root->SetupSmallestSize(this);
this->nested_array_size = (uint)(biggest_index + 1);
this->nested_array = CallocT<NWidgetCore *>(this->nested_array_size);
this->nested_root->FillNestedArray(this->nested_array, this->nested_array_size);