* rct2: 0x0066F0DD */
| 781 | * rct2: 0x0066F0DD |
| 782 | */ |
| 783 | void WindowResizeGuiScenarioEditor(int32_t width, int32_t height) |
| 784 | { |
| 785 | auto* mainWind = WindowGetMain(); |
| 786 | if (mainWind != nullptr) |
| 787 | { |
| 788 | Viewport* viewport = mainWind->viewport; |
| 789 | mainWind->width = width; |
| 790 | mainWind->height = height; |
| 791 | viewport->width = width; |
| 792 | viewport->height = height; |
| 793 | if (!mainWind->widgets.empty() && mainWind->widgets[WC_MAIN_WINDOW__0].type == WidgetType::viewport) |
| 794 | { |
| 795 | mainWind->widgets[WC_MAIN_WINDOW__0].right = width; |
| 796 | mainWind->widgets[WC_MAIN_WINDOW__0].bottom = height; |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | auto* windowMgr = Ui::GetWindowManager(); |
| 801 | |
| 802 | WindowBase* topWind = windowMgr->FindByClass(WindowClass::topToolbar); |
| 803 | if (topWind != nullptr) |
| 804 | { |
| 805 | topWind->width = std::max(640, width); |
| 806 | } |
| 807 | |
| 808 | WindowBase* bottomWind = windowMgr->FindByClass(WindowClass::bottomToolbar); |
| 809 | if (bottomWind != nullptr) |
| 810 | { |
| 811 | bottomWind->windowPos.y = height - 32; |
| 812 | bottomWind->width = std::max(640, width); |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | /** |
| 817 | * Update zoom based volume attenuation for ride music and clear music list. |
no test coverage detected