summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-10 22:07:24 +0000
committerrubidium <rubidium@openttd.org>2008-04-10 22:07:24 +0000
commit5d6ef7bc6e9006bd1e626c823894724b0bd26060 (patch)
tree194c1c11fbae546438d646665e618fe16ce88159 /src
parent31f982f1f90cac05fa8183f64b3109386c7fe669 (diff)
downloadopenttd-5d6ef7bc6e9006bd1e626c823894724b0bd26060.tar.xz
(svn r12654) -Codechange: remove some unneeded right click handling due to the splitting of the load/refit button.
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 3010b7151..2631978fa 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -626,7 +626,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
break;
case WE_CLICK:
- HideDropDownMenu(w);
+ if (w->widget[e->we.click.widget].type != WWT_DROPDOWN) HideDropDownMenu(w);
switch (e->we.click.widget) {
case ORDER_WIDGET_ORDER_LIST: {
ResetObjectToPlace();
@@ -765,17 +765,6 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
}
break;
- case WE_RCLICK: {
- int s = OrderGetSel(w);
-
- if (e->we.click.widget != ORDER_WIDGET_FULL_LOAD) break;
- if (s == v->num_orders || !GetVehicleOrder(v, s)->IsType(OT_GOTO_DEPOT)) {
- GuiShowTooltips(STR_8857_MAKE_THE_HIGHLIGHTED_ORDER);
- } else {
- GuiShowTooltips(STR_SERVICE_HINT);
- }
- } break;
-
case WE_PLACE_OBJ:
OrdersPlaceObj(GetVehicle(w->window_number), e->we.place.tile, w);
break;
@@ -838,7 +827,7 @@ static const Widget _orders_train_widgets[] = {
{ WWT_DROPDOWN, RESIZE_TB, 14, 124, 247, 76, 87, STR_8827_FULL_LOAD, STR_8857_MAKE_THE_HIGHLIGHTED_ORDER}, // ORDER_WIDGET_FULL_LOAD
{ WWT_DROPDOWN, RESIZE_TB, 14, 248, 371, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, // ORDER_WIDGET_UNLOAD
{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 124, 247, 76, 87, STR_REFIT, STR_REFIT_TIP}, // ORDER_WIDGET_REFIT
- { WWT_PUSHTXTBTN, RESIZE_TB, 14, 248, 371, 76, 87, STR_SERVICE, STR_MAKE_THE_HIGHLIGHTED_ORDER}, // ORDER_WIDGET_SERVICE
+ { WWT_PUSHTXTBTN, RESIZE_TB, 14, 248, 371, 76, 87, STR_SERVICE, STR_SERVICE_HINT}, // ORDER_WIDGET_SERVICE
{ WWT_PANEL, RESIZE_RTB, 14, 372, 373, 76, 99, 0x0, STR_NULL}, // ORDER_WIDGET_RESIZE_BAR
{ WWT_PUSHIMGBTN, RESIZE_LRTB, 14, 372, 385, 76, 87, SPR_SHARED_ORDERS_ICON, STR_VEH_WITH_SHARED_ORDERS_LIST_TIP}, // ORDER_WIDGET_SHARED_ORDER_LIST
@@ -874,7 +863,7 @@ static const Widget _orders_widgets[] = {
{ WWT_DROPDOWN, RESIZE_TB, 14, 0, 185, 76, 87, STR_8827_FULL_LOAD, STR_8857_MAKE_THE_HIGHLIGHTED_ORDER}, // ORDER_WIDGET_FULL_LOAD
{ WWT_DROPDOWN, RESIZE_TB, 14, 186, 372, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, // ORDER_WIDGET_UNLOAD
{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 185, 76, 87, STR_REFIT, STR_REFIT_TIP}, // ORDER_WIDGET_REFIT
- { WWT_PUSHTXTBTN, RESIZE_TB, 14, 186, 372, 76, 87, STR_SERVICE, STR_NULL}, // ORDER_WIDGET_SERVICE
+ { WWT_PUSHTXTBTN, RESIZE_TB, 14, 186, 372, 76, 87, STR_SERVICE, STR_SERVICE_HINT}, // ORDER_WIDGET_SERVICE
{ WWT_PANEL, RESIZE_RTB, 14, 372, 373, 76, 99, 0x0, STR_NULL}, // ORDER_WIDGET_RESIZE_BAR
{ WWT_PUSHIMGBTN, RESIZE_LRTB, 14, 372, 385, 76, 87, SPR_SHARED_ORDERS_ICON, STR_VEH_WITH_SHARED_ORDERS_LIST_TIP}, // ORDER_WIDGET_SHARED_ORDER_LIST