(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
This commit is contained in:
tron
2007-01-28 10:09:40 +00:00
parent 737ca7b7f5
commit 5052c6609d
6 changed files with 17 additions and 10 deletions

View File

@@ -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;
}
}