* * rct2: 0x006EE65A */
| 247 | * rct2: 0x006EE65A |
| 248 | */ |
| 249 | void WindowPushOthersRight(WindowBase& window) |
| 250 | { |
| 251 | WindowVisitEach([&window](WindowBase* w) { |
| 252 | if (w == &window) |
| 253 | return; |
| 254 | if (w->flags.hasAny(WindowFlag::stickToBack, WindowFlag::stickToFront)) |
| 255 | return; |
| 256 | if (w->windowPos.x >= window.windowPos.x + window.width) |
| 257 | return; |
| 258 | if (w->windowPos.x + w->width <= window.windowPos.x) |
| 259 | return; |
| 260 | if (w->windowPos.y >= window.windowPos.y + window.height) |
| 261 | return; |
| 262 | if (w->windowPos.y + w->height <= window.windowPos.y) |
| 263 | return; |
| 264 | |
| 265 | w->invalidate(); |
| 266 | if (window.windowPos.x + window.width + 13 >= ContextGetWidth()) |
| 267 | return; |
| 268 | auto push_amount = window.windowPos.x + window.width - w->windowPos.x + 3; |
| 269 | w->windowPos.x += push_amount; |
| 270 | w->invalidate(); |
| 271 | if (w->viewport != nullptr) |
| 272 | w->viewport->pos.x += push_amount; |
| 273 | }); |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * |
no test coverage detected