mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Use absolute display units for the departure board
This commit is contained in:
parent
91d83335c7
commit
d8ecb9c016
@ -599,8 +599,10 @@ void DeparturesWindow<Twaypoint>::RecomputeDateWidth()
|
||||
uint count = cached_date_display_method ? 24*60 : 365;
|
||||
|
||||
for (uint i = 0; i < count; ++i) {
|
||||
SetDParam(0, INT_MAX - (i*interval));
|
||||
SetDParam(0, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(1, INT_MAX - (i*interval));
|
||||
SetDParam(2, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(3, INT_MAX - (i*interval));
|
||||
cached_date_width = std::max(GetStringBoundingBox(cached_arr_dep_display_method ? STR_DEPARTURES_TIME_BOTH : STR_DEPARTURES_TIME_DEP).width, cached_date_width);
|
||||
cached_status_width = std::max((GetStringBoundingBox(STR_DEPARTURES_EXPECTED)).width, cached_status_width);
|
||||
}
|
||||
@ -779,13 +781,18 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
|
||||
|
||||
if (d->terminus == INVALID_STATION) continue;
|
||||
|
||||
StringID time_str = (departure_types[0] && departure_types[1]) ? (d->type == D_DEPARTURE ? STR_DEPARTURES_TIME_DEP : STR_DEPARTURES_TIME_ARR) : STR_DEPARTURES_TIME;
|
||||
|
||||
if (_settings_client.gui.departure_show_both) time_str = STR_DEPARTURES_TIME_BOTH;
|
||||
|
||||
/* Time */
|
||||
SetDParam(0, d->scheduled_tick);
|
||||
SetDParam(1, d->scheduled_tick - (d->scheduled_waiting_time > 0 ? d->scheduled_waiting_time : d->order->GetWaitTime()));
|
||||
StringID time_str;
|
||||
if (_settings_client.gui.departure_show_both) {
|
||||
time_str = STR_DEPARTURES_TIME_BOTH;
|
||||
SetDParam(0, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(1, d->scheduled_tick - (d->scheduled_waiting_time > 0 ? d->scheduled_waiting_time : d->order->GetWaitTime()));
|
||||
SetDParam(2, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(3, d->scheduled_tick);
|
||||
} else {
|
||||
time_str = (departure_types[0] && departure_types[1]) ? (d->type == D_DEPARTURE ? STR_DEPARTURES_TIME_DEP : STR_DEPARTURES_TIME_ARR) : STR_DEPARTURES_TIME;
|
||||
SetDParam(0, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(1, d->scheduled_tick);
|
||||
}
|
||||
ltr ? DrawString( text_left, text_left + time_width, y + 1, time_str)
|
||||
: DrawString(text_right - time_width, text_right, y + 1, time_str);
|
||||
|
||||
@ -928,7 +935,7 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
|
||||
/* The vehicle has been cancelled. */
|
||||
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_CANCELLED);
|
||||
} else{
|
||||
if (d->lateness <= TimetableDisplayUnitSize() && d->scheduled_tick > now_date) {
|
||||
if (d->lateness <= TimetableAbsoluteDisplayUnitSize() && d->scheduled_tick > now_date) {
|
||||
/* We have no evidence that the vehicle is late, so assume it is on time. */
|
||||
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_ON_TIME);
|
||||
} else {
|
||||
@ -938,7 +945,8 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
|
||||
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_DELAYED);
|
||||
} else {
|
||||
/* The vehicle is expected to be late and is not yet due to arrive. */
|
||||
SetDParam(0, d->scheduled_tick + d->lateness);
|
||||
SetDParam(0, STR_JUST_TT_TIME_ABS);
|
||||
SetDParam(1, d->scheduled_tick + d->lateness);
|
||||
DrawString(status_left, status_right, y + 1, STR_DEPARTURES_EXPECTED);
|
||||
}
|
||||
}
|
||||
|
@ -1230,10 +1230,10 @@ STR_DEPARTURES_SHOW_AIRCRAFT_TOOLTIP :{BLACK}Zobrazit
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. Ctrl+kliknutí je zobrazí samostatně.
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}Tuto stanici aktuálně nemá v jízdním řádu žádné vozidlo.
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}Nejsou požadovány žádné informace z jízdního řádu.
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} přes {STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} přes
|
||||
@ -1270,7 +1270,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}Včas
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}Přijel
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}Opožděn
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Očekávání {TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Očekávání {STRING}
|
||||
STR_DEPARTURES_CANCELLED :{RED}SPOJ ZRUŠEN
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}Odjezdové tabule
|
||||
|
@ -1360,10 +1360,10 @@ STR_DEPARTURES_SHOW_AIRCRAFT_TOOLTIP :{BLACK}Show upc
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. Ctrl+Click to show exclusively.
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}No vehicles are currently timetabled for this station.
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}No timetable information has been requested.
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING1}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING1} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING1} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING1} {RED}{DOWN_ARROW} {ORANGE}{STRING1} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} via {STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} via
|
||||
@ -1400,7 +1400,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}On time
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}Arrived
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}Delayed
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Expt {TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Expt {STRING1}
|
||||
STR_DEPARTURES_CANCELLED :{RED}Cancelled
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}Departure boards
|
||||
|
@ -1306,10 +1306,10 @@ STR_DEPARTURES_SHOW_AIRCRAFT_TOOLTIP :{BLACK}Amosar p
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. Ctrl+Click para amosar exclusivamente
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}Non hai vehículos actualmente programados para esta estación
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}Non se solicitou información dos horarios
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} vía {STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} vía
|
||||
@ -1346,7 +1346,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}A tempo
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}Chegadas
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}Demorado
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Esperado {TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Esperado {STRING}
|
||||
STR_DEPARTURES_CANCELLED :{RED}Cancelado
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}Taboleiros de saídas
|
||||
|
@ -1112,10 +1112,10 @@ STR_DEPARTURES_VIA_TOOLTIP :{BLACK}Zeige ge
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. Strg+Klick zur exklusiven Anzeige.
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}Aktuell sind für diese Station keine Fahrzeuge geplant.
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}Es wurde keine Fahrplanauskunft angefordert.
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} über {STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} über
|
||||
@ -1149,7 +1149,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}Pünktlich
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}Eingetroffen
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}Verspätet
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Erwartet am {TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}Erwartet am {STRING}
|
||||
STR_DEPARTURES_CANCELLED :{RED}Gestrichen
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}Abfahrtstafeln
|
||||
|
@ -54,10 +54,10 @@ STR_DEPARTURES_ARRIVALS_TOOLTIP :{BLACK}到着
|
||||
STR_DEPARTURES_VIA_TOOLTIP :{BLACK}通過車両を表示
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}現在、ダイヤを設定している車両はありません。
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}発車標が設定されていません。
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} 経由 {STRING}経由
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} 経由
|
||||
@ -90,7 +90,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}定時
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}到着しました
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}遅れています
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW} {TT_TIME}見込み
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW} {STRING}見込み
|
||||
STR_DEPARTURES_CANCELLED :{RED}運休
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}発車標
|
||||
|
@ -1308,10 +1308,10 @@ STR_DEPARTURES_SHOW_AIRCRAFT_TOOLTIP :{BLACK}이 역
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. CTRL + 클릭하면 이 차량 종류만 보여줍니다
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}시간표가 지정된 차량이 없습니다.
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}표시할 정보를 선택하십시오.
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING} 경유 {STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING} 경유
|
||||
@ -1348,7 +1348,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}정시운행
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}도착
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}지연
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}{TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}{STRING}
|
||||
STR_DEPARTURES_CANCELLED :{RED}취소됨
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}출발/도착 정보
|
||||
|
@ -1249,10 +1249,10 @@ STR_DEPARTURES_SHOW_AIRCRAFT_TOOLTIP :{BLACK}显示
|
||||
STR_DEPARTURES_SHOW_TYPE_TOOLTIP_CTRL_SUFFIX :{BLACK}{STRING}. Ctrl+点击设置仅显示此类型载具
|
||||
STR_DEPARTURES_EMPTY :{ORANGE}当前车站当前没有被列入时刻表的载具
|
||||
STR_DEPARTURES_NONE_SELECTED :{ORANGE}没有被请求的时刻表信息
|
||||
STR_DEPARTURES_TIME :{ORANGE}{TT_TIME}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{TT_TIME} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{1:TT_TIME} {RED}{DOWN_ARROW} {ORANGE}{0:TT_TIME} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME :{ORANGE}{STRING}
|
||||
STR_DEPARTURES_TIME_DEP :{ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TIME_ARR :{ORANGE}{STRING} {RED}{DOWN_ARROW}
|
||||
STR_DEPARTURES_TIME_BOTH :{ORANGE}{STRING} {RED}{DOWN_ARROW} {ORANGE}{STRING} {GREEN}{UP_ARROW}
|
||||
STR_DEPARTURES_TERMINUS :{ORANGE}{STATION}{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA_STATION :{ORANGE}{STATION}{STRING}经由{STRING}
|
||||
STR_DEPARTURES_TERMINUS_VIA :{ORANGE}{STATION}{STRING}经由
|
||||
@ -1289,7 +1289,7 @@ STR_DEPARTURES_STATION_PORTAIRPORT :{ORANGE} {SHIP}
|
||||
STR_DEPARTURES_ON_TIME :{GREEN}准时
|
||||
STR_DEPARTURES_ARRIVED :{GREEN}到达
|
||||
STR_DEPARTURES_DELAYED :{YELLOW}延误
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}约 {TT_TIME}
|
||||
STR_DEPARTURES_EXPECTED :{YELLOW}约 {STRING}
|
||||
STR_DEPARTURES_CANCELLED :{RED}取消
|
||||
|
||||
STR_CONFIG_SETTING_DEPARTUREBOARDS :{ORANGE}出发看板
|
||||
|
Loading…
Reference in New Issue
Block a user