Position of landscaping toolbar.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user