1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

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

This commit is contained in:
mrmbernardi
2024-06-30 02:54:32 +10:00
committed by GitHub
parent 30a9ade6ae
commit b4a38e42ce
2 changed files with 8 additions and 3 deletions

View File

@@ -30,6 +30,7 @@
- Change: [#21214] Wacky Worlds and Time Twisters 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 Twisters 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).

View File

@@ -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;
}
}
}