Skip to content

Commit

Permalink
Use light blue colour for station tile coverage highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Jul 18, 2019
1 parent 8b1fb60 commit 67dd9ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/viewport.cpp
Expand Up @@ -1110,6 +1110,7 @@ enum TileHighlightType {
THT_WHITE,
THT_BLUE,
THT_RED,
THT_LIGHT_BLUE,
};

const Station *_viewport_highlight_station; ///< Currently selected station for coverage area highlight
Expand All @@ -1123,7 +1124,7 @@ const Town *_viewport_highlight_town; ///< Currently selected town for cov
static TileHighlightType GetTileHighlightType(TileIndex t)
{
if (_viewport_highlight_station != nullptr) {
if (IsTileType(t, MP_STATION) && GetStationIndex(t) == _viewport_highlight_station->index) return THT_WHITE;
if (IsTileType(t, MP_STATION) && GetStationIndex(t) == _viewport_highlight_station->index) return THT_LIGHT_BLUE;
if (_viewport_highlight_station->TileIsInCatchment(t)) return THT_BLUE;
}

Expand Down Expand Up @@ -1161,6 +1162,7 @@ static void DrawTileHighlightType(const TileInfo *ti, TileHighlightType tht)
case THT_WHITE: DrawTileSelectionRect(ti, PAL_NONE); break;
case THT_BLUE: DrawTileSelectionRect(ti, PALETTE_SEL_TILE_BLUE); break;
case THT_RED: DrawTileSelectionRect(ti, PALETTE_TILE_RED_PULSATING); break;
case THT_LIGHT_BLUE: DrawTileSelectionRect(ti, SPR_ZONING_INNER_HIGHLIGHT_LIGHT_BLUE); break;
}
}

Expand Down

0 comments on commit 67dd9ff

Please sign in to comment.