summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-10-13 11:06:58 +0000
committerplanetmaker <planetmaker@openttd.org>2013-10-13 11:06:58 +0000
commit122158b4d857e50d7d4dd4cd41dc0a8f7a077ae3 (patch)
tree1baa946453724a922ed9050028d10fa8b35745bd /src/order_gui.cpp
parent2609693fe8cff2c0274e5d7d796a984cbde594cf (diff)
downloadopenttd-122158b4d857e50d7d4dd4cd41dc0a8f7a077ae3.tar.xz
(svn r25859) -Add [FS#5784]: Hightlight active goto item in order list dropdown (adf88)
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 231e5938f..a86e7f5fa 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1275,7 +1275,15 @@ public:
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) {
this->OrderClick_Goto();
} else {
- ShowDropDownMenu(this, this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, 0, WID_O_GOTO, 0, 0);
+ int sel;
+ switch (this->goto_type) {
+ case OPOS_NONE: sel = -1; break;
+ case OPOS_GOTO: sel = 0; break;
+ case OPOS_CONDITIONAL: sel = 2; break;
+ case OPOS_SHARE: sel = 3; break;
+ default: NOT_REACHED();
+ }
+ ShowDropDownMenu(this, this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, sel, WID_O_GOTO, 0, 0);
}
break;