diff options
author | fonsinchen <fonsinchen@openttd.org> | 2014-05-01 14:53:06 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2014-05-01 14:53:06 +0000 |
commit | 64e4e52c3342a459dd2ee96fb0b9b165edaafb96 (patch) | |
tree | 4c4f1b67a87a61e0350bccf085f098b3ade700dd /src/timetable_gui.cpp | |
parent | 11d98f043e96b7b7d9a2f97b5a7297b641f97c26 (diff) | |
download | openttd-64e4e52c3342a459dd2ee96fb0b9b165edaafb96.tar.xz |
(svn r26550) -Change: Show measured order times in timetable GUI
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index cd0125255..2c6a22c5d 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -402,9 +402,16 @@ struct TimetableWindow : Window { string = STR_TIMETABLE_NOT_TIMETABLEABLE; colour = ((i == selected) ? TC_SILVER : TC_GREY) | TC_NO_SHADE; } else if (!order->IsTravelTimetabled()) { - string = order->GetMaxSpeed() != UINT16_MAX ? - STR_TIMETABLE_TRAVEL_NOT_TIMETABLED_SPEED : - STR_TIMETABLE_TRAVEL_NOT_TIMETABLED; + if (order->GetTravelTime() > 0) { + SetTimetableParams(0, 1, order->GetTravelTime()); + string = order->GetMaxSpeed() != UINT16_MAX ? + STR_TIMETABLE_TRAVEL_FOR_SPEED_ESTIMATED : + STR_TIMETABLE_TRAVEL_FOR_ESTIMATED; + } else { + string = order->GetMaxSpeed() != UINT16_MAX ? + STR_TIMETABLE_TRAVEL_NOT_TIMETABLED_SPEED : + STR_TIMETABLE_TRAVEL_NOT_TIMETABLED; + } } else { SetTimetableParams(0, 1, order->GetTimetabledTravel()); string = order->GetMaxSpeed() != UINT16_MAX ? @@ -546,7 +553,7 @@ struct TimetableWindow : Window { StringID current = STR_EMPTY; if (order != NULL) { - uint time = (selected % 2 == 1) ? order->GetTimetabledTravel() : order->GetTimetabledWait(); + uint time = (selected % 2 == 1) ? order->GetTravelTime() : order->GetWaitTime(); if (!_settings_client.gui.timetable_in_ticks) time /= DAY_TICKS; if (time != 0) { @@ -556,7 +563,7 @@ struct TimetableWindow : Window { } this->query_is_speed_query = false; - ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, this, CS_NUMERAL, QSF_NONE); + ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED); break; } |