From d8f1933a5b81d3cf13ae05432ac22eea450bef2d Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 22 Apr 2019 15:16:48 +0200 Subject: [PATCH] Show dash for station index for non-station elements --- data/language/en-GB.txt | 2 +- src/openrct2-ui/windows/TileInspector.cpp | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 9e57c493b8..02c61a2feb 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3724,7 +3724,7 @@ STR_6273 :Music STR_6274 :Can't set colour scheme... STR_6275 :{WINDOW_COLOUR_2}Station style: STR_6276 :{RED}{STRINGID} has guests getting stuck, possibly due to invalid ride type or operating mode. -STR_6277 :{WINDOW_COLOUR_2}Station index: {BLACK}{COMMA16} +STR_6277 :{WINDOW_COLOUR_2}Station index: {BLACK}{STRINGID} STR_6278 :Autosave amount STR_6279 :{SMALLFONT}{BLACK}Number of autosaves that should be kept STR_6280 :{SMALLFONT}{BLACK}Chat diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 10af49f1ca..08a56b03f4 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -1858,7 +1858,18 @@ static void window_tile_inspector_paint(rct_window* w, rct_drawpixelinfo* dpi) if (track_element_is_station(tileElement)) { int16_t stationIndex = trackElement->GetStationIndex(); - gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_STATION_INDEX, &stationIndex, COLOUR_DARK_GREEN, x, y + 55); + set_format_arg(0, rct_string_id, STR_COMMA16); + set_format_arg(2, int16_t, stationIndex); + gfx_draw_string_left( + dpi, STR_TILE_INSPECTOR_STATION_INDEX, gCommonFormatArgs, COLOUR_DARK_GREEN, x, y + 55); + } + else + { + const char* stationNone = "-"; + set_format_arg(0, rct_string_id, STR_STRING); + set_format_arg(2, char*, stationNone); + gfx_draw_string_left( + dpi, STR_TILE_INSPECTOR_STATION_INDEX, gCommonFormatArgs, COLOUR_DARK_GREEN, x, y + 55); } // Properties