Position of landscaping toolbar.

This commit is contained in:
Juanjo
2013-10-19 11:48:29 +00:00
committed by pelya
parent d7b18a8e2d
commit 02d035fbef
34 changed files with 49724 additions and 9 deletions

View File

@@ -259,13 +259,6 @@ struct TerraformToolbarWindow : Window {
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt = GetToolbarAlignedWindowPosition(sm_width);
pt.y += sm_height;
return pt;
}
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
{
if (pt.x != -1) {
@@ -348,7 +341,7 @@ static const NWidgetPart _nested_terraform_widgets[] = {
};
static WindowDesc _terraform_desc(
WDP_MANUAL, "toolbar_landscape", 0, 0,
WDP_ALIGN_TOOLBAR, "toolbar_landscape", 0, 0,
WC_SCEN_LAND_GEN, WC_NONE,
WDF_CONSTRUCTION,
_nested_terraform_widgets, lengthof(_nested_terraform_widgets),
@@ -374,7 +367,6 @@ Window *ShowTerraformToolbar(Window *link)
DeleteWindowById(WC_SCEN_LAND_GEN, 0, true);
w = AllocateWindowDescFront<TerraformToolbarWindow>(&_terraform_desc, 0);
/* Align the terraform toolbar under the main toolbar. */
w->top -= w->height;
w->SetDirty();
/* Put the linked toolbar to the left / right of it. */
link->left = w->left + (_current_text_dir == TD_RTL ? w->width : -link->width);