Merge branch 'master' into jgrpp
# Conflicts: # .gitignore # src/network/network_server.cpp # src/vehicle_gui.cpp
This commit is contained in:
@@ -3119,6 +3119,7 @@ private:
|
||||
SEL_DC_BASEPLANE = SEL_DC_GOTO_DEPOT, ///< First plane of the #WID_VV_SELECT_DEPOT_CLONE stacked widget.
|
||||
SEL_RT_BASEPLANE = SEL_RT_REFIT, ///< First plane of the #WID_VV_SELECT_REFIT_TURN stacked widget.
|
||||
};
|
||||
bool mouse_over_start_stop = false;
|
||||
|
||||
/**
|
||||
* Display a plane in the window.
|
||||
@@ -3322,7 +3323,7 @@ public:
|
||||
SetDParam(1, percent);
|
||||
}
|
||||
}
|
||||
} else if (v->vehstatus & VS_STOPPED) {
|
||||
} else if (v->vehstatus & VS_STOPPED && (!mouse_over_start_stop || v->IsStoppedInDepot())) {
|
||||
if (v->type == VEH_TRAIN) {
|
||||
if (v->cur_speed == 0) {
|
||||
if (Train::From(v)->gcache.cached_power == 0) {
|
||||
@@ -3585,6 +3586,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnMouseOver(Point pt, int widget) override
|
||||
{
|
||||
bool start_stop = widget == WID_VV_START_STOP;
|
||||
if (start_stop != mouse_over_start_stop) {
|
||||
mouse_over_start_stop = start_stop;
|
||||
this->SetWidgetDirty(WID_VV_START_STOP);
|
||||
}
|
||||
}
|
||||
|
||||
void OnResize() override
|
||||
{
|
||||
if (this->viewport != nullptr) {
|
||||
|
Reference in New Issue
Block a user