Add hotkeys to remember locations and scroll back to them
This commit is contained in:
@@ -60,6 +60,8 @@
|
||||
#include "zoning.h"
|
||||
#include "watch_gui.h"
|
||||
|
||||
#include "citymania/locations.hpp"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
|
||||
@@ -2100,6 +2102,7 @@ enum MainToolbarHotkeys {
|
||||
MTHK_SETTINGS_ADV,
|
||||
MTHK_NEWGRF,
|
||||
MTHK_LANDINFO,
|
||||
CM_LOCATION_HOTKEYS,
|
||||
};
|
||||
|
||||
/** Main toolbar. */
|
||||
@@ -2215,7 +2218,7 @@ struct MainToolbarWindow : Window {
|
||||
case MTHK_SETTINGS_ADV: ShowGameSettings(); break;
|
||||
case MTHK_NEWGRF: ShowNewGRFSettings(!_networking && _settings_client.gui.UserIsAllowedToChangeNewGRFs(), true, true, &_grfconfig); break;
|
||||
case MTHK_LANDINFO: _last_started_action = PlaceLandBlockInfo(); break;
|
||||
default: return ES_NOT_HANDLED;
|
||||
default: return citymania::HandleToolbarHotkey(hotkey);
|
||||
}
|
||||
return ES_HANDLED;
|
||||
}
|
||||
@@ -2367,6 +2370,7 @@ static Hotkey maintoolbar_hotkeys[] = {
|
||||
Hotkey((uint16)0, "newgrf_window", MTHK_NEWGRF),
|
||||
Hotkey((uint16)0, "sign_list", MTHK_SIGN_LIST),
|
||||
Hotkey((uint16)0, "land_info", MTHK_LANDINFO),
|
||||
CM_LOCATION_HOTKEYS_DECL,
|
||||
HOTKEY_LIST_END
|
||||
};
|
||||
HotkeyList MainToolbarWindow::hotkeys("maintoolbar", maintoolbar_hotkeys);
|
||||
|
||||
Reference in New Issue
Block a user