Merge pull request #23680 from ZehMatt/fix-widget-access

Fix widget access
This commit is contained in:
Matt 2025-01-22 13:06:13 +02:00 committed by GitHub
commit b9486b9eb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ namespace OpenRCT2::Ui::Windows
void CreateViewport()
{
const auto& viewportWidget = window_banner_widgets[WIDX_VIEWPORT];
const auto& viewportWidget = widgets[WIDX_VIEWPORT];
ViewportCreate(
this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 },
(viewportWidget.width()) - 1, (viewportWidget.height()) - 1, Focus(_bannerViewPos));

View file

@ -760,7 +760,7 @@ namespace OpenRCT2::Ui::Windows
// Draw campaign button text
for (int32_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++)
{
auto campaignButton = &_windowFinancesMarketingWidgets[WIDX_CAMPAIGN_1 + i];
auto campaignButton = &widgets[WIDX_CAMPAIGN_1 + i];
if (campaignButton->type != WindowWidgetType::Empty)
{
// Draw button text