From 508dc154df8d845d84a2ed24ff801fc760cfe577 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 28 Jan 2007 10:09:40 +0000 Subject: (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 --- src/terraform_gui.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/terraform_gui.cpp') 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; + } } -- cgit v1.2.3-54-g00ecf