[Change] Added ability for detailed depot viewport tooltips to show single lines, if possible. Made some suggested adjustments.
This commit is contained in:
@@ -1237,8 +1237,14 @@ bool GetDepotTooltipString(const TileIndex tile, char *buffer_position, const ch
|
|||||||
|
|
||||||
SetDParam(0, total_vehicle_count);
|
SetDParam(0, total_vehicle_count);
|
||||||
|
|
||||||
if (_settings_client.gui.depot_tooltip_mode == DTM_SIMPLE || stopped_vehicle_count == 0 && waiting_vehicle_count == 0 && consist_count == 0) {
|
if (_settings_client.gui.depot_tooltip_mode == DTM_SIMPLE || (stopped_vehicle_count == 0 && waiting_vehicle_count == 0 && consist_count == 0)) {
|
||||||
GetString(buffer_position, STR_DEPOT_VIEW_COUNT_TOOLTIP, buffer_tail);
|
GetString(buffer_position, STR_DEPOT_VIEW_COUNT_TOOLTIP, buffer_tail);
|
||||||
|
} else if (_settings_client.gui.depot_tooltip_mode == DTM_DETAILED && total_vehicle_count == stopped_vehicle_count) {
|
||||||
|
GetString(buffer_position, STR_DEPOT_VIEW_COUNT_STOPPED_TOOLTIP, buffer_tail);
|
||||||
|
} else if (_settings_client.gui.depot_tooltip_mode == DTM_DETAILED && total_vehicle_count == waiting_vehicle_count) {
|
||||||
|
GetString(buffer_position, STR_DEPOT_VIEW_COUNT_WAITING_TOOLTIP, buffer_tail);
|
||||||
|
} else if (_settings_client.gui.depot_tooltip_mode == DTM_DETAILED && total_vehicle_count == consist_count) {
|
||||||
|
GetString(buffer_position, STR_DEPOT_VIEW_COUNT_CONSISTS_TOOLTIP, buffer_tail);
|
||||||
} else {
|
} else {
|
||||||
buffer_position = GetString(buffer_position, STR_DEPOT_VIEW_TOTAL_TOOLTIP, buffer_tail);
|
buffer_position = GetString(buffer_position, STR_DEPOT_VIEW_TOTAL_TOOLTIP, buffer_tail);
|
||||||
if (stopped_vehicle_count > 0) {
|
if (stopped_vehicle_count > 0) {
|
||||||
|
@@ -1414,8 +1414,11 @@ STR_INDUSTRY_VIEW_STOCKPILED_TOOLTIP :{CARGO_LONG} wa
|
|||||||
STR_INDUSTRY_VIEW_TRANSPORTED_TOOLTIP_EXTENSION :{CARGO_LONG}{RAW_STRING} ({COMMA}%)
|
STR_INDUSTRY_VIEW_TRANSPORTED_TOOLTIP_EXTENSION :{CARGO_LONG}{RAW_STRING} ({COMMA}%)
|
||||||
STR_INDUSTRY_VIEW_INFO_TOOLTIP :{BLACK}{RAW_STRING}
|
STR_INDUSTRY_VIEW_INFO_TOOLTIP :{BLACK}{RAW_STRING}
|
||||||
|
|
||||||
STR_DEPOT_VIEW_COUNT_TOOLTIP :{COMMA} indside
|
STR_DEPOT_VIEW_COUNT_TOOLTIP :{COMMA} vehicle{P "" s} {P is are} inside
|
||||||
STR_DEPOT_VIEW_TOTAL_TOOLTIP :Of {COMMA} inside:
|
STR_DEPOT_VIEW_COUNT_STOPPED_TOOLTIP :{COMMA} stopped vehicle{P "" s} {P is are} inside
|
||||||
|
STR_DEPOT_VIEW_COUNT_WAITING_TOOLTIP :{COMMA} waiting vehicle{P "" s} {P is are} inside
|
||||||
|
STR_DEPOT_VIEW_COUNT_CONSISTS_TOOLTIP :{COMMA} consist{P "" s} {P is are} inside
|
||||||
|
STR_DEPOT_VIEW_TOTAL_TOOLTIP :Of {COMMA} vehicles inside:
|
||||||
STR_DEPOT_VIEW_STOPPED_TOOLTIP :{}{COMMA} {P is are} stopped
|
STR_DEPOT_VIEW_STOPPED_TOOLTIP :{}{COMMA} {P is are} stopped
|
||||||
STR_DEPOT_VIEW_WAITING_TOOLTIP :{}{COMMA} {P is are} waiting
|
STR_DEPOT_VIEW_WAITING_TOOLTIP :{}{COMMA} {P is are} waiting
|
||||||
STR_DEPOT_VIEW_CONSISTS_TOOLTIP :{}{COMMA} {P is are} {P "a " ""}consist{P "" s}
|
STR_DEPOT_VIEW_CONSISTS_TOOLTIP :{}{COMMA} {P is are} {P "a " ""}consist{P "" s}
|
||||||
|
@@ -3112,8 +3112,8 @@ bool GetStationViewportTooltipString(const TileIndex tile, char *buffer_position
|
|||||||
|
|
||||||
bool next = false;
|
bool next = false;
|
||||||
|
|
||||||
if (_settings_client.gui.station_viewport_tooltip_name == STNM_ALWAYS_ON ||
|
if ( _settings_client.gui.station_viewport_tooltip_name == STNM_ALWAYS_ON ||
|
||||||
_settings_client.gui.station_viewport_tooltip_name == STNM_ON_IF_HIDDEN && !HasBit(_display_opt, DO_SHOW_STATION_NAMES)) {
|
(_settings_client.gui.station_viewport_tooltip_name == STNM_ON_IF_HIDDEN && !HasBit(_display_opt, DO_SHOW_STATION_NAMES))) {
|
||||||
SetDParam(0, station_id);
|
SetDParam(0, station_id);
|
||||||
buffer_position = GetString(buffer_position, STR_STATION_VIEW_NAME_TOOLTIP, buffer_tail);
|
buffer_position = GetString(buffer_position, STR_STATION_VIEW_NAME_TOOLTIP, buffer_tail);
|
||||||
buffer_position = StationGetSpecialStringExternal(buffer_position, station->facilities, buffer_tail);
|
buffer_position = StationGetSpecialStringExternal(buffer_position, station->facilities, buffer_tail);
|
||||||
|
Reference in New Issue
Block a user