Merge branch 'enhanced_viewport_overlay-sx' into jgrpp
town_gui.cpp updated due to struct CommandContainer change. Conflicts: src/command.cpp src/command_type.h src/gfxinit.cpp src/openttd.cpp src/pbs.cpp src/saveload/extended_ver_sl.cpp src/saveload/extended_ver_sl.h src/saveload/saveload.cpp src/stdafx.h src/train_cmd.cpp src/viewport_type.h src/window_type.h
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "date_gui.h"
|
||||
#include "vehicle_gui.h"
|
||||
#include "settings_type.h"
|
||||
#include "viewport_func.h"
|
||||
|
||||
#include "widgets/timetable_widget.h"
|
||||
|
||||
@@ -179,6 +180,13 @@ struct TimetableWindow : Window {
|
||||
this->owner = this->vehicle->owner;
|
||||
}
|
||||
|
||||
~TimetableWindow()
|
||||
{
|
||||
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
|
||||
MarkAllRouteStepsDirty(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the arrival-departure list for a given vehicle
|
||||
* @param v the vehicle to make the list for
|
||||
@@ -716,6 +724,27 @@ struct TimetableWindow : Window {
|
||||
// this->GetWidget<NWidgetStacked>(TTV_AUTO_SELECTION)->SetDisplayedPlane(!_settings_game.order.timetable_automated ? 0 : 1);
|
||||
this->GetWidget<NWidgetStacked>(WID_VT_EXPECTED_SELECTION)->SetDisplayedPlane(_settings_client.gui.timetable_arrival_departure ? 0 : 1);
|
||||
}
|
||||
|
||||
virtual void OnFocus(Window *previously_focused_window)
|
||||
{
|
||||
if (HasFocusedVehicleChanged(this->window_number, previously_focused_window)) {
|
||||
MarkAllRoutePathsDirty(this->vehicle);
|
||||
MarkAllRouteStepsDirty(this);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnFocusLost(Window *newly_focused_window)
|
||||
{
|
||||
if (HasFocusedVehicleChanged(this->window_number, newly_focused_window)) {
|
||||
MarkAllRoutePathsDirty(this->vehicle);
|
||||
MarkAllRouteStepsDirty(this);
|
||||
}
|
||||
}
|
||||
|
||||
const Vehicle *GetVehicle()
|
||||
{
|
||||
return this->vehicle;
|
||||
}
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_timetable_widgets[] = {
|
||||
|
Reference in New Issue
Block a user