diff options
author | dominik <dominik@openttd.org> | 2005-01-21 18:36:17 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2005-01-21 18:36:17 +0000 |
commit | 5290d5f667871863876345069d1767afe5a9bd54 (patch) | |
tree | 718a490143d9d9e9c55f63428e34a50e94d6e227 | |
parent | 962dd27a8cab5bf7f97f6af2cba427f8fe59fdf3 (diff) | |
download | openttd-5290d5f667871863876345069d1767afe5a9bd54.tar.xz |
(svn r1582) Fix: Only the train orders GUI has a non-stop button now.
-rw-r--r-- | order_gui.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/order_gui.c b/order_gui.c index 0c9692929..57e16f227 100644 --- a/order_gui.c +++ b/order_gui.c @@ -500,7 +500,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e) } -static const Widget _orders_widgets[] = { +static const Widget _orders_train_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 319, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PANEL, RESIZE_NONE, 14, 0, 307, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, @@ -514,6 +514,29 @@ static const Widget _orders_widgets[] = { { WIDGETS_END}, }; +static const WindowDesc _orders_train_desc = { + -1,-1, 320, 88, + WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESTORE_DPARAM, + _orders_train_widgets, + OrdersWndProc +}; + +static const Widget _orders_widgets[] = { +{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 319, 0, 13, STR_8829_ORDERS, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_PANEL, RESIZE_NONE, 14, 0, 307, 14, 75, 0x0, STR_8852_ORDERS_LIST_CLICK_ON_ORDER}, +{ WWT_SCROLLBAR, RESIZE_NONE, 14, 308, 319, 14, 75, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, + +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 63, 76, 87, STR_8823_SKIP, STR_8853_SKIP_THE_CURRENT_ORDER}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 64, 128, 76, 87, STR_8824_DELETE, STR_8854_DELETE_THE_HIGHLIGHTED}, +{ WWT_EMPTY, RESIZE_NONE, 14, 0, 0, 76, 87, 0x0, 0x0}, +{WWT_NODISTXTBTN, RESIZE_NONE, 14, 129, 192, 76, 87, STR_8826_GO_TO, STR_8856_INSERT_A_NEW_ORDER_BEFORE}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 193, 256, 76, 87, STR_FULLLOAD_OR_SERVICE, STR_NULL}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 257, 319, 76, 87, STR_8828_UNLOAD, STR_8858_MAKE_THE_HIGHLIGHTED_ORDER}, +{ WIDGETS_END}, +}; + static const WindowDesc _orders_desc = { -1,-1, 320, 88, WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW, @@ -548,7 +571,11 @@ void ShowOrdersWindow(Vehicle *v) _alloc_wnd_parent_num = veh; - w = AllocateWindowDesc( (v->owner == _local_player) ? &_orders_desc : &_other_orders_desc); + if (v->owner != _local_player) { + w = AllocateWindowDesc( &_other_orders_desc); + } else { + w = AllocateWindowDesc( (v->type == VEH_Train) ? &_orders_train_desc : &_orders_desc); + } w->window_number = veh; w->caption_color = v->owner; |