Show ctrl-click function of shared orders button in tooltip
This commit is contained in:
@@ -1584,6 +1584,7 @@ STR_ORDERS_OCCUPANCY_LIST_TOOLTIP :{BLACK}Order oc
|
|||||||
STR_ORDERS_OCCUPANCY_PERCENT :{NUM}%
|
STR_ORDERS_OCCUPANCY_PERCENT :{NUM}%
|
||||||
|
|
||||||
STR_ORDERS_NEW_GROUP_TOOLTIP :{BLACK}Create group from single vehicle
|
STR_ORDERS_NEW_GROUP_TOOLTIP :{BLACK}Create group from single vehicle
|
||||||
|
STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP_EXTRA :{STRING}{}{BLACK}Ctrl+Click to create group from single vehicle
|
||||||
|
|
||||||
STR_ORDER_GO_TO_WAYPOINT_REVERSE :Go via and reverse at {WAYPOINT}
|
STR_ORDER_GO_TO_WAYPOINT_REVERSE :Go via and reverse at {WAYPOINT}
|
||||||
STR_ORDER_GO_NON_STOP_TO_WAYPOINT_REVERSE :Go non-stop via and reverse at {WAYPOINT}
|
STR_ORDER_GO_NON_STOP_TO_WAYPOINT_REVERSE :Go non-stop via and reverse at {WAYPOINT}
|
||||||
|
@@ -3517,6 +3517,22 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override
|
||||||
|
{
|
||||||
|
switch (widget) {
|
||||||
|
case WID_O_SHARED_ORDER_LIST: {
|
||||||
|
if (this->vehicle->owner == _local_company) {
|
||||||
|
uint64 args[] = { STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP };
|
||||||
|
GuiShowTooltips(this, STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP_EXTRA, lengthof(args), args, close_cond);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Vehicle *GetVehicle()
|
const Vehicle *GetVehicle()
|
||||||
{
|
{
|
||||||
return this->vehicle;
|
return this->vehicle;
|
||||||
|
@@ -641,6 +641,14 @@ struct TimetableWindow : GeneralVehicleWindow {
|
|||||||
GuiShowTooltips(this, STR_TIMETABLE_CLEAR_SPEED_TOOLTIP, 0, nullptr, close_cond);
|
GuiShowTooltips(this, STR_TIMETABLE_CLEAR_SPEED_TOOLTIP, 0, nullptr, close_cond);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
case WID_VT_SHARED_ORDER_LIST: {
|
||||||
|
if (this->vehicle->owner == _local_company) {
|
||||||
|
uint64 args[] = { STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP };
|
||||||
|
GuiShowTooltips(this, STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP_EXTRA, lengthof(args), args, close_cond);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user