Align all construction windows to the left, to make more space at the center of the screen
This commit is contained in:
@@ -1483,7 +1483,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = {
|
||||
|
||||
/** High level window description of the station-build window (default & newGRF) */
|
||||
static WindowDesc _station_builder_desc(
|
||||
WDP_AUTO, "build_station_rail", 350, 0,
|
||||
WDP_AUTO, "build_station_rail", 0, 0,
|
||||
WC_BUILD_STATION, WC_BUILD_TOOLBAR,
|
||||
WDF_CONSTRUCTION,
|
||||
_nested_station_builder_widgets, lengthof(_nested_station_builder_widgets)
|
||||
|
||||
@@ -1724,7 +1724,9 @@ static Point LocalGetWindowPlacement(const WindowDesc *desc, int16 sm_width, int
|
||||
pt.x = (_screen.width + 10 - default_width) - 20;
|
||||
}
|
||||
const Window *wt = FindWindowById(WC_MAIN_TOOLBAR_RIGHT, 0);
|
||||
if (wt && pt.x + default_width > _screen.width - wt->width) {
|
||||
if (wt && (pt.x + default_width > _screen.width - wt->width ||
|
||||
desc->parent_cls == WC_BUILD_TOOLBAR || desc->parent_cls == WC_SCEN_LAND_GEN)) {
|
||||
// Move all build toolbar windows to the right, because all build toolbars are always at the right part of the screen
|
||||
pt.x = _screen.width - wt->width - default_width;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user