diff options
author | frosch <frosch@openttd.org> | 2013-06-15 15:28:09 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-15 15:28:09 +0000 |
commit | 1b8b1f3f6cbd65b73399b1d39aacb7fb674a091c (patch) | |
tree | 555791c9e1370b2caba036286b98f64efe970bd3 /src/order_gui.cpp | |
parent | 40c2864e4dd478693ef6c108cc95cd2e6b5e70d0 (diff) | |
download | openttd-1b8b1f3f6cbd65b73399b1d39aacb7fb674a091c.tar.xz |
(svn r25410) -Codechange: Put all hotkeys of a window into a static HotkeyList member.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r-- | src/order_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index daa3462dd..ada3f5ed9 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1440,7 +1440,7 @@ public: { if (this->vehicle->owner != _local_company) return ES_NOT_HANDLED; - switch (CheckHotkeyMatch(order_hotkeys, keycode)) { + switch (this->hotkeys.CheckMatch(keycode)) { case OHK_SKIP: this->OrderClick_Skip(); break; case OHK_DELETE: this->OrderClick_Delete(); break; case OHK_GOTO: this->OrderClick_Goto(); break; @@ -1526,10 +1526,10 @@ public: this->vscroll->SetCapacityFromWidget(this, WID_O_ORDER_LIST); } - static Hotkey order_hotkeys[]; + static HotkeyList hotkeys; }; -Hotkey OrdersWindow::order_hotkeys[] = { +static Hotkey order_hotkeys[] = { Hotkey('D', "skip", OHK_SKIP), Hotkey('F', "delete", OHK_DELETE), Hotkey('G', "goto", OHK_GOTO), @@ -1543,7 +1543,7 @@ Hotkey OrdersWindow::order_hotkeys[] = { Hotkey((uint16)0, "no_load", OHK_NO_LOAD), HOTKEY_LIST_END }; -Hotkey *_order_hotkeys = OrdersWindow::order_hotkeys; +HotkeyList OrdersWindow::hotkeys("order", order_hotkeys); /** Nested widget definition for "your" train orders. */ static const NWidgetPart _nested_orders_train_widgets[] = { |