mirror of https://github.com/OpenTTD/OpenTTD
(svn r25857) -Codechange [FS#5783]: Add void goto type to indicate inactivity in order window (adf88)
parent
5bf105d4f2
commit
7ed5f6edf9
|
@ -496,6 +496,7 @@ struct OrdersWindow : public Window {
|
||||||
private:
|
private:
|
||||||
/** Under what reason are we using the PlaceObject functionality? */
|
/** Under what reason are we using the PlaceObject functionality? */
|
||||||
enum OrderPlaceObjectState {
|
enum OrderPlaceObjectState {
|
||||||
|
OPOS_NONE,
|
||||||
OPOS_GOTO,
|
OPOS_GOTO,
|
||||||
OPOS_CONDITIONAL,
|
OPOS_CONDITIONAL,
|
||||||
OPOS_SHARE,
|
OPOS_SHARE,
|
||||||
|
@ -818,6 +819,7 @@ public:
|
||||||
|
|
||||||
this->selected_order = -1;
|
this->selected_order = -1;
|
||||||
this->order_over = INVALID_VEH_ORDER_ID;
|
this->order_over = INVALID_VEH_ORDER_ID;
|
||||||
|
this->goto_type = OPOS_NONE;
|
||||||
this->owner = v->owner;
|
this->owner = v->owner;
|
||||||
|
|
||||||
this->UpdateAutoRefitState();
|
this->UpdateAutoRefitState();
|
||||||
|
@ -1197,7 +1199,6 @@ public:
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case WID_O_ORDER_LIST: {
|
case WID_O_ORDER_LIST: {
|
||||||
if (this->goto_type == OPOS_CONDITIONAL) {
|
if (this->goto_type == OPOS_CONDITIONAL) {
|
||||||
this->goto_type = OPOS_GOTO;
|
|
||||||
VehicleOrderID order_id = this->GetOrderFromPt(_cursor.pos.y - this->top);
|
VehicleOrderID order_id = this->GetOrderFromPt(_cursor.pos.y - this->top);
|
||||||
if (order_id != INVALID_VEH_ORDER_ID) {
|
if (order_id != INVALID_VEH_ORDER_ID) {
|
||||||
Order order;
|
Order order;
|
||||||
|
@ -1499,6 +1500,7 @@ public:
|
||||||
|
|
||||||
virtual void OnPlaceObjectAbort()
|
virtual void OnPlaceObjectAbort()
|
||||||
{
|
{
|
||||||
|
this->goto_type = OPOS_NONE;
|
||||||
this->RaiseWidget(WID_O_GOTO);
|
this->RaiseWidget(WID_O_GOTO);
|
||||||
this->SetWidgetDirty(WID_O_GOTO);
|
this->SetWidgetDirty(WID_O_GOTO);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue