* Compute the position of the construction toolbars. * * If the terraform toolbar is open place them to the right/left of it, * otherwise use default toolbar aligned position. * @param window_width the width of the toolbar to get the position for. * @return Coordinate of the top-left corner of the new toolbar. */
| 1699 | * @return Coordinate of the top-left corner of the new toolbar. |
| 1700 | */ |
| 1701 | Point AlignInitialConstructionToolbar(int window_width) |
| 1702 | { |
| 1703 | Point pt = GetToolbarAlignedWindowPosition(window_width); |
| 1704 | const Window *w = FindWindowByClass(WC_SCEN_LAND_GEN); |
| 1705 | if (w != nullptr && w->top == pt.y && !_settings_client.gui.link_terraform_toolbar) { |
| 1706 | pt.x = w->left + (_current_text_dir == TD_RTL ? w->width : - window_width); |
| 1707 | } |
| 1708 | return pt; |
| 1709 | } |
| 1710 | |
| 1711 | /** |
| 1712 | * Compute the position of the top-left corner of a new window that is opened. |
no test coverage detected