summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-12 14:46:42 +0000
committerrubidium <rubidium@openttd.org>2010-12-12 14:46:42 +0000
commit15e07279dd1add322c39ace79d80a9b6fdfdbd57 (patch)
treed2dc27789e82ed50086006ffbecc712021fd8fcd
parenta029b2b83aa344fdd8ba1f7bc0915205c52daca0 (diff)
downloadopenttd-15e07279dd1add322c39ace79d80a9b6fdfdbd57.tar.xz
(svn r21478) -Change [FS#4297]: improve some order related tooltips. Based on patch by Krille
-rw-r--r--src/lang/english.txt7
-rw-r--r--src/order_gui.cpp11
2 files changed, 14 insertions, 4 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 6a131e314..09b904952 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3152,7 +3152,7 @@ STR_ORDERS_CAPTION :{WHITE}{VEHICLE
STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable
STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view
-STR_ORDERS_LIST_TOOLTIP :{BLACK}Orders list - click on an order to highlight it. Ctrl+Click scrolls to the station
+STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click scrolls to the order's destination
STR_ORDER_INDEX :{COMMA}:{NBSP}
STR_ORDER_TEXT :{STRING4} {STRING2}
@@ -3216,15 +3216,16 @@ STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the
STR_ORDERS_DELETE_BUTTON :{BLACK}Delete
STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order
+STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders
STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing
-STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click deletes the complete order list
+STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click additionally deletes all orders for this vehicle.
STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To
STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot
STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar
STR_ORDER_CONDITIONAL :Conditional order jump
STR_ORDER_SHARE :Share orders
-STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop' and depot orders 'service'. 'Share orders' lets this vehicle share orders with the selected vehicle.
+STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop' and depot orders 'service'. 'Share orders' or Ctrl lets this vehicle share orders with the selected vehicle. Clicking a vehicle copies the orders from that vehicle
STR_ORDERS_GO_TO_DROPDOWN_TOOLTIP :{BLACK}Insert an advanced order
STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 149ffc3f4..bdba6bf64 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -706,7 +706,7 @@ private:
if (!this->vehicle->IsOrderListShared() || this->selected_order != this->vehicle->GetNumOrders()) return;
/* If Ctrl is pressed, delete the order list as if we clicked the 'Delete' button. */
if (_ctrl_pressed) {
- this->OrderClick_Delete(i);
+ this->OrderClick_Delete(0);
return;
}
@@ -879,6 +879,15 @@ public:
delete_sel->SetDisplayedPlane(DP_BOTTOM_MIDDLE_DELETE);
this->SetWidgetDisabledState(ORDER_WIDGET_DELETE,
(uint)this->vehicle->GetNumOrders() + ((shared_orders || this->vehicle->GetNumOrders() != 0) ? 1 : 0) <= (uint)this->selected_order);
+
+ /* Set the tooltip of the 'delete' button depending on whether the
+ * 'End of Orders' order or a regular order is selected. */
+ NWidgetCore *nwi = this->GetWidget<NWidgetCore>(ORDER_WIDGET_DELETE);
+ if (this->selected_order == this->vehicle->GetNumOrders()) {
+ nwi->SetDataTip(STR_ORDERS_DELETE_BUTTON, STR_ORDERS_DELETE_ALL_TOOLTIP);
+ } else {
+ nwi->SetDataTip(STR_ORDERS_DELETE_BUTTON, STR_ORDERS_DELETE_TOOLTIP);
+ }
}
/* First row. */