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 | 5052c6609d64c61b00ae862b67f01cdce2adbd1d (patch) | |
tree | 11b4deb3cc72ca5ee663ed421d3b106ebd62c35a /src/terraform_gui.cpp | |
parent | 737ca7b7f5786f94c5ff5f805dde163429c2d09e (diff) | |
download | openttd-5052c6609d64c61b00ae862b67f01cdce2adbd1d.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; + } } |