mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Disable marketing tab when marketing is prohibited (#19828)
Disable marketing tab when marketing is prohibited --------- Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- Feature: [#19547] Add large sloped turns to hybrid coaster and single rail coaster.
|
||||
- Feature: [OpenMusic#25] Added Prehistoric ride music style.
|
||||
- Improved: [#18490] Reduce guests walking through trains on level crossing next to station.
|
||||
- Improved: [#18996] When marketing campaigns are disabled, disable the Marketing tab in the Finances window.
|
||||
- Improved: [#19764] Miscellaneous scenery tab now grouped next to the all-scenery tab.
|
||||
- Improved: [#19830] “Highlight path issues” will now hide wall elements.
|
||||
- Fix: [#12598] Number of holes is not set correctly when saving track designs.
|
||||
|
||||
@@ -226,6 +226,11 @@ class FinancesWindow final : public Window
|
||||
private:
|
||||
uint32_t _lastPaintedMonth;
|
||||
|
||||
void SetDisabledTabs()
|
||||
{
|
||||
disabled_widgets = (gParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) ? (1uLL << WIDX_TAB_5) : 0;
|
||||
}
|
||||
|
||||
public:
|
||||
void OnOpen() override
|
||||
{
|
||||
@@ -299,7 +304,7 @@ public:
|
||||
WindowInitScrollWidgets(*this);
|
||||
}
|
||||
|
||||
disabled_widgets = 0;
|
||||
WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_6);
|
||||
|
||||
for (auto i = 0; i < WINDOW_FINANCES_PAGE_COUNT; i++)
|
||||
SetWidgetPressed(WIDX_TAB_1 + i, false);
|
||||
@@ -443,8 +448,9 @@ public:
|
||||
hold_down_widgets = _windowFinancesPageHoldDownWidgets[p];
|
||||
pressed_widgets = 0;
|
||||
widgets = _windowFinancesPageWidgets[p];
|
||||
|
||||
SetDisabledTabs();
|
||||
Invalidate();
|
||||
|
||||
if (p == WINDOW_FINANCES_PAGE_RESEARCH)
|
||||
{
|
||||
width = WW_RESEARCH;
|
||||
|
||||
Reference in New Issue
Block a user