Close #22173: Patrol path tiles change colour to show selection. (#22201)

This commit is contained in:
mrmbernardi authored and GitHub committed 2024-06-29 16:54:32 +00:00
1 parent 30a9ade6ae
commit b4a38e42ce
2 files changed
+8 -3

No files matched your search

+1
View File
@@ -30,6 +30,7 @@
- Change: [#21214] Wacky Worlds and Time Twister’s scenario names now match their park names.
- Change: [#21991] UI themes JSON now use colour names and a translucency bool, instead of a number (old themes still work).
- Change: [#22057] Reorder Time Twister’s scenarios and adjust their difficulty classification.
- Change: [#22173] Patrol path selection is visible over existing patrol paths.
- Change: [#22196] Make track nagivation buttons holdable.
- Fix: [#13234] Vehicle weight sometimes wrong after using Remove All Guests cheat.
- Fix: [#13294] Map corners are cut off in some directions (original bug).
@@ -858,12 +858,16 @@ static std::pair<int32_t, int32_t> SurfaceGetHeightAboveWater(
std::optional<colour_t> GetPatrolAreaTileColour(const CoordsXY& pos)
{
bool selected = gMapSelectFlags & MAP_SELECT_FLAG_ENABLE && gMapSelectType == MAP_SELECT_TYPE_FULL
&& pos.x >= gMapSelectPositionA.x && pos.x <= gMapSelectPositionB.x && pos.y >= gMapSelectPositionA.y
&& pos.y <= gMapSelectPositionB.y;
auto patrolAreaToRender = GetPatrolAreaToRender();
if (const auto* staffType = std::get_if<StaffType>(&patrolAreaToRender))
{
if (IsPatrolAreaSetForStaffType(*staffType, pos))
{
return COLOUR_GREY;
return selected ? COLOUR_WHITE : COLOUR_GREY;
}
}
else
@@ -874,11 +878,11 @@ std::optional<colour_t> GetPatrolAreaTileColour(const CoordsXY& pos)
{
if (staff->IsPatrolAreaSet(pos))
{
return COLOUR_LIGHT_BLUE;
return selected ? COLOUR_ICY_BLUE : COLOUR_LIGHT_BLUE;
}
else if (IsPatrolAreaSetForStaffType(staff->AssignedStaffType, pos))
{
return COLOUR_GREY;
return selected ? COLOUR_WHITE : COLOUR_GREY;
}
}
}