diff options
author | arikover <arikover@gmail.com> | 2020-03-31 22:23:41 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-04-10 10:00:16 +0200 |
commit | 1e3e960fce149b7e6be4b1e9eecff4d3fe1c2a20 (patch) | |
tree | 0f2fbb0674ca6cb047abf08fa9b7a80cb67dff25 /src | |
parent | 7aab7642bf11160cc530e256e6768986dc444136 (diff) | |
download | openttd-1e3e960fce149b7e6be4b1e9eecff4d3fe1c2a20.tar.xz |
Add: Hotkey for Land Info in normal mode
- added a hotkey for land_info in normal mode
- no default key is set
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbar_gui.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index d2fe46691..303e4c729 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2018,6 +2018,7 @@ enum MainToolbarHotkeys { MTHK_BUILD_AIRPORT, MTHK_BUILD_TREES, MTHK_MUSIC, + MTHK_LANDINFO, MTHK_AI_DEBUG, MTHK_SMALL_SCREENSHOT, MTHK_ZOOMEDIN_SCREENSHOT, @@ -2086,6 +2087,7 @@ struct MainToolbarWindow : Window { EventState OnHotkey(int hotkey) override { + CallBackFunction cbf = CBF_NONE; switch (hotkey) { case MTHK_PAUSE: ToolbarPauseClick(this); break; case MTHK_FASTFORWARD: ToolbarFastForwardClick(this); break; @@ -2126,8 +2128,10 @@ struct MainToolbarWindow : Window { case MTHK_EXTRA_VIEWPORT: ShowExtraViewPortWindowForTileUnderCursor(); break; case MTHK_CLIENT_LIST: if (_networking) ShowClientList(); break; case MTHK_SIGN_LIST: ShowSignList(); break; + case MTHK_LANDINFO: cbf = PlaceLandBlockInfo(); break; default: return ES_NOT_HANDLED; } + if (cbf != CBF_NONE) _last_started_action = cbf; return ES_HANDLED; } @@ -2238,6 +2242,7 @@ static Hotkey maintoolbar_hotkeys[] = { Hotkey('V', "extra_viewport", MTHK_EXTRA_VIEWPORT), Hotkey((uint16)0, "client_list", MTHK_CLIENT_LIST), Hotkey((uint16)0, "sign_list", MTHK_SIGN_LIST), + Hotkey((uint16)0, "land_info", MTHK_LANDINFO), HOTKEY_LIST_END }; HotkeyList MainToolbarWindow::hotkeys("maintoolbar", maintoolbar_hotkeys); |