Align all construction windows to the left, to make more space at the center of the screen

This commit is contained in:
pelya
2014-11-16 00:06:43 +02:00
parent ac76047f54
commit 6f9c0181c1
2 changed files with 4 additions and 2 deletions

View File

@@ -1727,7 +1727,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;
}