diff options
author | tron <tron@openttd.org> | 2007-01-28 10:09:40 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-28 10:09:40 +0000 |
commit | 508dc154df8d845d84a2ed24ff801fc760cfe577 (patch) | |
tree | 11b4deb3cc72ca5ee663ed421d3b106ebd62c35a /src/terraform_gui.cpp | |
parent | b6186cf39cb558df6422fd530c1f7fd7120d5bfb (diff) | |
download | openttd-508dc154df8d845d84a2ed24ff801fc760cfe577.tar.xz |
(svn r8436) -Fix
-Feature: When linking the terraform toolbar to the build toolbars place them side by side instead of on top of each other
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r-- | src/terraform_gui.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 8d6e1276a..a71cb3cd5 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -278,8 +278,15 @@ static const WindowDesc _terraform_desc = { TerraformToolbWndProc }; -void ShowTerraformToolbar(void) +void ShowTerraformToolbar(Window *link) { if (!IsValidPlayer(_current_player)) return; - AllocateWindowDescFront(&_terraform_desc, 0); + Window *w = AllocateWindowDescFront(&_terraform_desc, 0); + if (w != NULL && link != NULL) { + /* Align the terraform toolbar under the main toolbar and put the linked + * toolbar to left of it + */ + w->top = 22; + link->left = w->left - link->width; + } } |