summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-02 23:51:05 +0000
committerDarkvater <darkvater@openttd.org>2006-11-02 23:51:05 +0000
commit7977bd51a490c5cb5bca26041c696c7b3ab68e6c (patch)
tree8fc2b0a2b88f0f34f10b978ac004fe1e02cf4515 /order_gui.c
parentee3e0cf5e4aea22464674fa61d588788a616bfd1 (diff)
downloadopenttd-7977bd51a490c5cb5bca26041c696c7b3ab68e6c.tar.xz
(svn r7046) -Fix [FS#311]: 'Goto' button in orders window got depressed along with all other
buttons when an existing order was modified (GrimRC)
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/order_gui.c b/order_gui.c
index 2bdcd4648..d9dbc6203 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -549,6 +549,17 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
/* Update the scroll + matrix */
w->vscroll.cap = (w->widget[2].bottom - w->widget[2].top) / 10;
break;
+
+ case WE_TIMEOUT: { // handle button unclick ourselves...
+ // unclick all buttons except for the 'goto' button (7), which is 'persistent'
+ int i;
+ for (i = 0; w->widget[i].type != WWT_LAST; i++) {
+ if (IsWindowWidgetLowered(w, i) && i != 7) {
+ RaiseWindowWidget(w, i);
+ InvalidateWidget(w, i);
+ }
+ }
+ } break;
}
}
@@ -574,7 +585,7 @@ static const Widget _orders_train_widgets[] = {
static const WindowDesc _orders_train_desc = {
-1,-1, 399, 88,
WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW,
- WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
+ WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE,
_orders_train_widgets,
OrdersWndProc
};
@@ -601,7 +612,7 @@ static const Widget _orders_widgets[] = {
static const WindowDesc _orders_desc = {
-1,-1, 410, 88,
WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW,
- WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
+ WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE,
_orders_widgets,
OrdersWndProc
};