mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Merge pull request #22802 from Gymnasiast/fix/transparency-options-for-real-this-time
Revert transparency option fixes that... weren’t
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
- Fix: [#22653] Add several .parkpatch files for missing water tiles in RCT1 and RCT2 scenarios.
|
||||
- Fix: [#22654] Improve several .parkpatch files to remove misplaced scenario elements in RCT1 and RCT2 scenarios.
|
||||
- Fix: [#22655] Fix surface style of Botany Breakers around missing water tiles.
|
||||
- Fix: [#22729] Invisibility settings persist after reloading OpenRCT2.
|
||||
- Fix: [#22734] Support clearance above steep Side-Friction track is too low.
|
||||
|
||||
0.4.14 (2024-09-01)
|
||||
@@ -33,7 +34,6 @@
|
||||
- Change: [#22491] Scrollbars are now hidden if the scrollable widget is not actually overflowing.
|
||||
- Change: [#22541] In editor/sandbox mode, tool widgets now appear on the side of the map window, instead of the bottom.
|
||||
- Change: [#22592] Cheats have been redistributed along three new tabs: date, staff, and nature/weather.
|
||||
- Fix: [#21123] Transparency options are not respected on startup.
|
||||
- Fix: [#21189] Additional missing/misplaced land & construction rights tiles in Schneider Shores and Urban Park.
|
||||
- Fix: [#21908] Errors showing up when placing/moving track design previews.
|
||||
- Fix: [#22307] Hover tooltips in financial charts are not invalidated properly.
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <openrct2-ui/interface/Widget.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/world/Footpath.h>
|
||||
|
||||
@@ -38,7 +37,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ViewportCreate(this, windowPos, width, height, Focus(CoordsXYZ(0x0FFF, 0x0FFF, 0)));
|
||||
if (viewport != nullptr)
|
||||
{
|
||||
SetViewportFlags(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO);
|
||||
SetViewportFlags();
|
||||
viewport->rotation = 0;
|
||||
}
|
||||
gShowGridLinesRefCount = 0;
|
||||
@@ -53,44 +52,21 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
private:
|
||||
void SetViewportFlags(bool isTitleWindow)
|
||||
void SetViewportFlags()
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_SOUND_ON;
|
||||
if (isTitleWindow)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config::Get().general.InvisibleRides)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_RIDES;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_RIDES;
|
||||
}
|
||||
if (Config::Get().general.InvisibleVehicles)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEHICLES;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_VEHICLES;
|
||||
}
|
||||
if (Config::Get().general.InvisibleTrees)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEGETATION;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_VEGETATION;
|
||||
}
|
||||
if (Config::Get().general.InvisibleScenery)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SCENERY;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_SCENERY;
|
||||
}
|
||||
if (Config::Get().general.InvisiblePaths)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_PATHS;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_PATHS;
|
||||
}
|
||||
if (Config::Get().general.InvisibleSupports)
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SUPPORTS;
|
||||
viewport->flags |= VIEWPORT_FLAG_HIDE_SUPPORTS;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -158,18 +158,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t ToggleSeeThrough(uint32_t wflags, uint32_t seeThroughFlag, uint32_t transparencyFlag)
|
||||
{
|
||||
wflags ^= seeThroughFlag;
|
||||
// If see-through is disabled, we also want to disable invisible
|
||||
if (!(wflags & seeThroughFlag))
|
||||
{
|
||||
wflags &= ~transparencyFlag;
|
||||
}
|
||||
SaveInConfig(wflags);
|
||||
return wflags;
|
||||
}
|
||||
|
||||
uint32_t ToggleTransparency(uint32_t wflags, uint32_t transparencyFlag, uint32_t seeThroughFlag)
|
||||
{
|
||||
wflags ^= transparencyFlag;
|
||||
@@ -177,10 +165,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
wflags |= seeThroughFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
wflags &= ~seeThroughFlag;
|
||||
}
|
||||
SaveInConfig(wflags);
|
||||
return wflags;
|
||||
}
|
||||
@@ -198,22 +182,22 @@ namespace OpenRCT2::Ui::Windows
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_HIDE_RIDES:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_RIDES, VIEWPORT_FLAG_INVISIBLE_RIDES);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_RIDES;
|
||||
break;
|
||||
case WIDX_HIDE_VEHICLES:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_VEHICLES, VIEWPORT_FLAG_INVISIBLE_VEHICLES);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_VEHICLES;
|
||||
break;
|
||||
case WIDX_HIDE_SCENERY:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_SCENERY, VIEWPORT_FLAG_INVISIBLE_SCENERY);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_SCENERY;
|
||||
break;
|
||||
case WIDX_HIDE_VEGETATION:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_VEGETATION, VIEWPORT_FLAG_INVISIBLE_VEGETATION);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_VEGETATION;
|
||||
break;
|
||||
case WIDX_HIDE_PATHS:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_PATHS, VIEWPORT_FLAG_INVISIBLE_PATHS);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_PATHS;
|
||||
break;
|
||||
case WIDX_HIDE_SUPPORTS:
|
||||
wflags = ToggleSeeThrough(wflags, VIEWPORT_FLAG_HIDE_SUPPORTS, VIEWPORT_FLAG_INVISIBLE_SUPPORTS);
|
||||
wflags ^= VIEWPORT_FLAG_HIDE_SUPPORTS;
|
||||
break;
|
||||
case WIDX_INVISIBLE_RIDES:
|
||||
wflags = ToggleTransparency(wflags, VIEWPORT_FLAG_INVISIBLE_RIDES, VIEWPORT_FLAG_HIDE_RIDES);
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace OpenRCT2::Config
|
||||
model->InvisibleTrees = reader->GetBoolean("invisible_trees", false);
|
||||
model->InvisibleScenery = reader->GetBoolean("invisible_scenery", false);
|
||||
model->InvisiblePaths = reader->GetBoolean("invisible_paths", false);
|
||||
model->InvisibleSupports = reader->GetBoolean("invisible_supports", false);
|
||||
model->InvisibleSupports = reader->GetBoolean("invisible_supports", true);
|
||||
|
||||
model->LastVersionCheckTime = reader->GetInt64("last_version_check_time", 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user