summaryrefslogtreecommitdiff
path: root/src/terraform_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp11
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;
+ }
}