Close #12460: Refactor KeyboardShortcut to use strong enum (#12475)

* Close #12460: Refactor KeyboardShortcut to use strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
frutiemax 2020-08-20 22:54:43 -04:00 committed by GitHub
parent 6607badad0
commit 4cc550a364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 260 additions and 248 deletions

View File

@ -38,31 +38,34 @@
extern bool gWindowSceneryEyedropperEnabled;
uint8_t gKeyboardShortcutChangeId;
using shortcut_action = void (*)();
using namespace OpenRCT2;
Input::Shortcut gKeyboardShortcutChangeId;
namespace
{
extern const shortcut_action shortcut_table[SHORTCUT_COUNT];
extern const shortcut_action shortcut_table[Input::ShortcutsCount];
}
/**
*
* rct2: 0x006E3E68
*/
using namespace OpenRCT2;
void keyboard_shortcut_handle(int32_t key)
{
int32_t shortcut = keyboard_shortcuts_get_from_key(key);
if (shortcut != -1)
auto shortcut = keyboard_shortcuts_get_from_key(key);
if (shortcut != Input::Shortcut::Undefined)
{
keyboard_shortcut_handle_command(shortcut);
}
}
void keyboard_shortcut_handle_command(int32_t shortcutIndex)
void keyboard_shortcut_handle_command(Input::Shortcut shortcut)
{
if (shortcutIndex >= 0 && static_cast<uint32_t>(shortcutIndex) < std::size(shortcut_table))
size_t shortcutIndex = static_cast<size_t>(shortcut);
if (shortcutIndex < std::size(shortcut_table))
{
shortcut_action action = shortcut_table[shortcutIndex];
if (action != nullptr)
@ -1029,7 +1032,8 @@ static void shortcut_toggle_clearance_checks()
namespace
{
const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
using namespace OpenRCT2::Input;
const shortcut_action shortcut_table[ShortcutsCount] = {
shortcut_close_top_most_window,
shortcut_close_all_floating_windows,
shortcut_cancel_construction_mode,

View File

@ -86,7 +86,7 @@ KeyboardShortcuts::~KeyboardShortcuts()
void KeyboardShortcuts::Reset()
{
for (size_t i = 0; i < SHORTCUT_COUNT; i++)
for (size_t i = 0; i < ShortcutsCount; i++)
{
_keys[i] = DefaultKeys[i];
}
@ -106,8 +106,8 @@ bool KeyboardShortcuts::Load()
if (version == KeyboardShortcuts::CURRENT_FILE_VERSION)
{
int32_t numShortcutsInFile = (fs.GetLength() - sizeof(uint16_t)) / sizeof(uint16_t);
int32_t numShortcutsToRead = std::min<int32_t>(SHORTCUT_COUNT, numShortcutsInFile);
for (int32_t i = 0; i < numShortcutsToRead; i++)
auto numShortcutsToRead = std::min<size_t>(ShortcutsCount, numShortcutsInFile);
for (size_t i = 0; i < numShortcutsToRead; i++)
{
_keys[i] = fs.ReadValue<uint16_t>();
}
@ -130,7 +130,7 @@ bool KeyboardShortcuts::Save()
std::string path = _env->GetFilePath(PATHID::CONFIG_KEYBOARD);
auto fs = FileStream(path, FILE_MODE_WRITE);
fs.WriteValue<uint16_t>(KeyboardShortcuts::CURRENT_FILE_VERSION);
for (int32_t i = 0; i < SHORTCUT_COUNT; i++)
for (size_t i = 0; i < ShortcutsCount; i++)
{
fs.WriteValue<uint16_t>(_keys[i]);
}
@ -146,27 +146,27 @@ bool KeyboardShortcuts::Save()
void KeyboardShortcuts::Set(int32_t key)
{
// Unmap shortcut that already uses this key
int32_t shortcut = GetFromKey(key);
if (shortcut != SHORTCUT_UNDEFINED)
auto shortcut = GetFromKey(key);
if (shortcut != Input::Shortcut::Undefined)
{
_keys[shortcut] = SHORTCUT_UNDEFINED;
_keys[static_cast<size_t>(shortcut)] = static_cast<uint16_t>(Input::Shortcut::Undefined);
}
// Map shortcut to this key
_keys[gKeyboardShortcutChangeId] = key;
_keys[static_cast<size_t>(gKeyboardShortcutChangeId)] = key;
Save();
}
int32_t KeyboardShortcuts::GetFromKey(int32_t key)
Shortcut KeyboardShortcuts::GetFromKey(int32_t key)
{
for (int32_t i = 0; i < SHORTCUT_COUNT; i++)
for (size_t i = 0; i < ShortcutsCount; i++)
{
if (key == _keys[i])
{
return i;
return static_cast<Shortcut>(i);
}
}
return SHORTCUT_UNDEFINED;
return Input::Shortcut::Undefined;
}
std::string KeyboardShortcuts::GetShortcutString(int32_t shortcut) const
@ -174,7 +174,7 @@ std::string KeyboardShortcuts::GetShortcutString(int32_t shortcut) const
utf8 buffer[256] = { 0 };
utf8 formatBuffer[256] = { 0 };
uint16_t shortcutKey = _keys[shortcut];
if (shortcutKey == SHORTCUT_UNDEFINED)
if (shortcutKey == Input::ScanCodeUndefined)
return std::string();
if (shortcutKey & SHIFT)
{
@ -219,12 +219,13 @@ std::string KeyboardShortcuts::GetShortcutString(int32_t shortcut) const
ScreenCoordsXY KeyboardShortcuts::GetKeyboardMapScroll(const uint8_t* keysState) const
{
ScreenCoordsXY screenCoords;
for (int32_t shortcutId = SHORTCUT_SCROLL_MAP_UP; shortcutId <= SHORTCUT_SCROLL_MAP_RIGHT; shortcutId++)
for (int32_t shortcutId = static_cast<int32_t>(Input::Shortcut::ScrollMapUp);
shortcutId <= static_cast<int32_t>(Input::Shortcut::ScrollMapRight); shortcutId++)
{
uint16_t shortcutKey = _keys[shortcutId];
uint8_t scancode = shortcutKey & 0xFF;
if (shortcutKey == 0xFFFF)
if (shortcutKey == Input::ScanCodeUndefined)
continue;
if (!keysState[scancode])
continue;
@ -241,18 +242,19 @@ ScreenCoordsXY KeyboardShortcuts::GetKeyboardMapScroll(const uint8_t* keysState)
if (static_cast<bool>(shortcutKey & CMD) != (keysState[SDL_SCANCODE_LGUI] || keysState[SDL_SCANCODE_RGUI]))
continue;
#endif
switch (shortcutId)
auto convertedShortcut = static_cast<Input::Shortcut>(shortcutId);
switch (convertedShortcut)
{
case SHORTCUT_SCROLL_MAP_UP:
case Input::Shortcut::ScrollMapUp:
screenCoords.y = -1;
break;
case SHORTCUT_SCROLL_MAP_LEFT:
case Input::Shortcut::ScrollMapLeft:
screenCoords.x = -1;
break;
case SHORTCUT_SCROLL_MAP_DOWN:
case Input::Shortcut::ScrollMapDown:
screenCoords.y = 1;
break;
case SHORTCUT_SCROLL_MAP_RIGHT:
case Input::Shortcut::ScrollMapRight:
screenCoords.x = 1;
break;
default:
@ -282,7 +284,7 @@ void keyboard_shortcuts_set(int32_t key)
return _instance->Set(key);
}
int32_t keyboard_shortcuts_get_from_key(int32_t key)
Shortcut keyboard_shortcuts_get_from_key(int32_t key)
{
return _instance->GetFromKey(key);
}
@ -299,7 +301,7 @@ ScreenCoordsXY get_keyboard_map_scroll(const uint8_t* keysState)
}
// Default keyboard shortcuts
const uint16_t KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = {
const uint16_t KeyboardShortcuts::DefaultKeys[Input::ShortcutsCount] = {
SDL_SCANCODE_BACKSPACE, // SHORTCUT_CLOSE_TOP_MOST_WINDOW
SHIFT | SDL_SCANCODE_BACKSPACE, // SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS
SDL_SCANCODE_ESCAPE, // SHORTCUT_CANCEL_CONSTRUCTION_MODE
@ -343,13 +345,13 @@ const uint16_t KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = {
SDL_SCANCODE_RIGHT, // SHORTCUT_SCROLL_MAP_RIGHT
SDL_SCANCODE_C, // SHORTCUT_OPEN_CHAT_WINDOW
PLATFORM_MODIFIER | SDL_SCANCODE_F10, // SHORTCUT_QUICK_SAVE_GAME
SHORTCUT_UNDEFINED, // SHORTCUT_SHOW_OPTIONS
SHORTCUT_UNDEFINED, // SHORTCUT_MUTE_SOUND
Input::ScanCodeUndefined, // SHORTCUT_SHOW_OPTIONS
Input::ScanCodeUndefined, // SHORTCUT_MUTE_SOUND
ALT | SDL_SCANCODE_RETURN, // SHORTCUT_WINDOWED_MODE_TOGGLE
SHORTCUT_UNDEFINED, // SHORTCUT_SHOW_MULTIPLAYER
SHORTCUT_UNDEFINED, // SHORTCUT_PAINT_ORIGINAL_TOGGLE
SHORTCUT_UNDEFINED, // SHORTCUT_DEBUG_PAINT_TOGGLE
SHORTCUT_UNDEFINED, // SHORTCUT_SEE_THROUGH_PATHS_TOGGLE
Input::ScanCodeUndefined, // SHORTCUT_SHOW_MULTIPLAYER
Input::ScanCodeUndefined, // SHORTCUT_PAINT_ORIGINAL_TOGGLE
Input::ScanCodeUndefined, // SHORTCUT_DEBUG_PAINT_TOGGLE
Input::ScanCodeUndefined, // SHORTCUT_SEE_THROUGH_PATHS_TOGGLE
SDL_SCANCODE_KP_4, // SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT
SDL_SCANCODE_KP_6, // SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT
SDL_SCANCODE_KP_5, // SHORTCUT_RIDE_CONSTRUCTION_USE_TRACK_DEFAULT
@ -365,12 +367,12 @@ const uint16_t KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = {
PLATFORM_MODIFIER | SDL_SCANCODE_L, // SHORTCUT_LOAD_GAME
SDL_SCANCODE_B, // SHORTCUT_CLEAR_SCENERY
SDL_SCANCODE_7, // SHORTCUT_GRIDLINES_DISPLAY_TOGGLE
SHORTCUT_UNDEFINED, // SHORTCUT_VIEW_CLIPPING
Input::ScanCodeUndefined, // SHORTCUT_VIEW_CLIPPING
SDL_SCANCODE_I, // SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE
SHORTCUT_UNDEFINED, // SHORTCUT_TILE_INSPECTOR
SHORTCUT_UNDEFINED, // SHORTCUT_ADVANCE_TO_NEXT_TICK
SHORTCUT_UNDEFINED, // SHORTCUT_SCENERY_PICKER
SHORTCUT_UNDEFINED, // SHORTCUT_SCALE_UP
SHORTCUT_UNDEFINED, // SHORTCUT_SCALE_DOWN
SHORTCUT_UNDEFINED, // SHORTCUT_TOGGLE_CLEARANCE_CHECKS
Input::ScanCodeUndefined, // SHORTCUT_TILE_INSPECTOR
Input::ScanCodeUndefined, // SHORTCUT_ADVANCE_TO_NEXT_TICK
Input::ScanCodeUndefined, // SHORTCUT_SCENERY_PICKER
Input::ScanCodeUndefined, // SHORTCUT_SCALE_UP
Input::ScanCodeUndefined, // SHORTCUT_SCALE_DOWN
Input::ScanCodeUndefined, // SHORTCUT_TOGGLE_CLEARANCE_CHECKS
};

View File

@ -24,101 +24,6 @@
struct ScreenCoordsXY;
enum KeyboardShortcut
{
SHORTCUT_CLOSE_TOP_MOST_WINDOW,
SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS,
SHORTCUT_CANCEL_CONSTRUCTION_MODE,
SHORTCUT_PAUSE_GAME,
SHORTCUT_ZOOM_VIEW_OUT,
SHORTCUT_ZOOM_VIEW_IN,
SHORTCUT_ROTATE_VIEW_CLOCKWISE,
SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE,
SHORTCUT_ROTATE_CONSTRUCTION_OBJECT,
SHORTCUT_UNDERGROUND_VIEW_TOGGLE,
SHORTCUT_REMOVE_BASE_LAND_TOGGLE,
SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE,
SHORTCUT_SEE_THROUGH_RIDES_TOGGLE,
SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE,
SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE,
SHORTCUT_INVISIBLE_PEOPLE_TOGGLE,
SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE,
SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE,
SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE,
SHORTCUT_ADJUST_LAND,
SHORTCUT_ADJUST_WATER,
SHORTCUT_BUILD_SCENERY,
SHORTCUT_BUILD_PATHS,
SHORTCUT_BUILD_NEW_RIDE,
SHORTCUT_SHOW_FINANCIAL_INFORMATION,
SHORTCUT_SHOW_RESEARCH_INFORMATION,
SHORTCUT_SHOW_RIDES_LIST,
SHORTCUT_SHOW_PARK_INFORMATION,
SHORTCUT_SHOW_GUEST_LIST,
SHORTCUT_SHOW_STAFF_LIST,
SHORTCUT_SHOW_RECENT_MESSAGES,
SHORTCUT_SHOW_MAP,
SHORTCUT_SCREENSHOT,
// New
SHORTCUT_REDUCE_GAME_SPEED,
SHORTCUT_INCREASE_GAME_SPEED,
SHORTCUT_OPEN_CHEAT_WINDOW,
SHORTCUT_REMOVE_TOP_BOTTOM_TOOLBAR_TOGGLE,
SHORTCUT_SCROLL_MAP_UP,
SHORTCUT_SCROLL_MAP_LEFT,
SHORTCUT_SCROLL_MAP_DOWN,
SHORTCUT_SCROLL_MAP_RIGHT,
SHORTCUT_OPEN_CHAT_WINDOW,
SHORTCUT_QUICK_SAVE_GAME,
SHORTCUT_SHOW_OPTIONS,
SHORTCUT_MUTE_SOUND,
SHORTCUT_WINDOWED_MODE_TOGGLE,
SHORTCUT_SHOW_MULTIPLAYER,
SHORTCUT_PAINT_ORIGINAL_TOGGLE,
SHORTCUT_DEBUG_PAINT_TOGGLE,
SHORTCUT_SEE_THROUGH_PATHS_TOGGLE,
SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT,
SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT,
SHORTCUT_RIDE_CONSTRUCTION_USE_TRACK_DEFAULT,
SHORTCUT_RIDE_CONSTRUCTION_SLOPE_DOWN,
SHORTCUT_RIDE_CONSTRUCTION_SLOPE_UP,
SHORTCUT_RIDE_CONSTRUCTION_CHAIN_LIFT_TOGGLE,
SHORTCUT_RIDE_CONSTRUCTION_BANK_LEFT,
SHORTCUT_RIDE_CONSTRUCTION_BANK_RIGHT,
SHORTCUT_RIDE_CONSTRUCTION_PREVIOUS_TRACK,
SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK,
SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT,
SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
SHORTCUT_LOAD_GAME,
SHORTCUT_CLEAR_SCENERY,
SHORTCUT_GRIDLINES_DISPLAY_TOGGLE,
SHORTCUT_VIEW_CLIPPING,
SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE,
SHORTCUT_TILE_INSPECTOR,
SHORTCUT_ADVANCE_TO_NEXT_TICK,
SHORTCUT_SCENERY_PICKER,
SHORTCUT_SCALE_UP,
SHORTCUT_SCALE_DOWN,
SHORTCUT_INSERT_CORRUPT_ELEMENT,
SHORTCUT_COPY_ELEMENT,
SHORTCUT_PASTE_ELEMENT,
SHORTCUT_REMOVE_ELEMENT,
SHORTCUT_MOVE_ELEMENT_UP,
SHORTCUT_MOVE_ELEMENT_DOWN,
SHORTCUT_INCREASE_X_COORD,
SHORTCUT_DECREASE_X_COORD,
SHORTCUT_INCREASE_Y_COORD,
SHORTCUT_DECREASE_Y_COORD,
SHORTCUT_INCREASE_ELEM_HEIGHT,
SHORTCUT_DECREASE_ELEM_HEIGHT,
SHORTCUT_TOGGLE_CLEARANCE_CHECKS,
SHORTCUT_COUNT,
SHORTCUT_UNDEFINED = 0xFFFF,
};
#include <string>
namespace OpenRCT2
@ -127,14 +32,110 @@ namespace OpenRCT2
namespace Input
{
enum class Shortcut : size_t
{
CloseTopMostWindow,
CloseAllFloatingWindows,
CancelConstructionMode,
PauseGame,
ZoomViewOut,
ZoomViewIn,
RotateViewClockwise,
RotateViewAnticlockwise,
RotateConstructionObject,
UndergroundViewToggle,
RemoveBaseLandToggle,
RemoveVerticalLandToggle,
SeeThroughRidesToggle,
SeeThroughSceneryToggle,
InvisibleSupportsToggle,
InvisiblePeopleToggle,
HeightMarksOnLandToggle,
HeightMarksOnRideTracksToggle,
HeightMarksOnPathsToggle,
AdjustLand,
AdjustWater,
BuildScenery,
BuildPaths,
BuildNewRide,
ShowFinancialInformation,
ShowResearchInformation,
ShowRidesList,
ShowParkInformation,
ShowGuestList,
ShowStaffList,
ShowRecentMessages,
ShowMap,
Screenshot,
// New
ReduceGameSpeed,
IncreaseGameSpeed,
OpenCheatWindow,
RemoveTopBottomToolbarToggle,
ScrollMapUp,
ScrollMapLeft,
ScrollMapDown,
ScrollMapRight,
OpenChatWindow,
QuickSaveGame,
ShowOptions,
MuteSound,
WindowedModeToggle,
ShowMultiplayer,
PaintOriginalToggle,
DebugPaintToggle,
SeeThroughPathsToggle,
RideConstructionTurnLeft,
RideConstructionTurnRight,
RideConstructionUseTrackDefault,
RideConstructionSlopeDown,
RideConstructionSlopeUp,
RideConstructionChainLiftToggle,
RideConstructionBankLeft,
RideConstructionBankRight,
RideConstructionPreviousTrack,
RideConstructionNextTrack,
RideConstructionBuildCurrent,
RideConstructionDemolishCurrent,
LoadGame,
ClearScenery,
GridlinesDisplayToggle,
ViewClipping,
HighlightPathIssuesToggle,
TileInspector,
AdvanceToNextTick,
SceneryPicker,
ScaleUp,
ScaleDown,
InsertCorruptElement,
CopyElement,
PasteElement,
RemoveElement,
MoveElementUp,
MoveElementDown,
IncreaseXCoord,
DecreaseXCoord,
IncreaseYCoord,
DecreaseYCoord,
IncreaseElementHeight,
DecreaseElementHeight,
ToggleClearanceChecks,
Count,
Undefined = 0xFFFF,
};
constexpr size_t ShortcutsCount = static_cast<size_t>(Shortcut::Count);
class KeyboardShortcuts
{
private:
constexpr static int32_t CURRENT_FILE_VERSION = 1;
static const uint16_t DefaultKeys[SHORTCUT_COUNT];
static const uint16_t DefaultKeys[ShortcutsCount];
std::shared_ptr<IPlatformEnvironment> const _env;
uint16_t _keys[SHORTCUT_COUNT];
uint16_t _keys[ShortcutsCount];
public:
KeyboardShortcuts(const std::shared_ptr<IPlatformEnvironment>& env);
@ -147,24 +148,25 @@ namespace OpenRCT2
std::string GetShortcutString(int32_t shortcut) const;
void Set(int32_t key);
int32_t GetFromKey(int32_t key);
Shortcut GetFromKey(int32_t key);
ScreenCoordsXY GetKeyboardMapScroll(const uint8_t* keysState) const;
};
const uint16_t ScanCodeUndefined = 0xFFFF;
} // namespace Input
} // namespace OpenRCT2
// The current shortcut being changed.
extern uint8_t gKeyboardShortcutChangeId;
extern OpenRCT2::Input::Shortcut gKeyboardShortcutChangeId;
void keyboard_shortcuts_reset();
bool keyboard_shortcuts_load();
bool keyboard_shortcuts_save();
void keyboard_shortcuts_set(int32_t key);
int32_t keyboard_shortcuts_get_from_key(int32_t key);
OpenRCT2::Input::Shortcut keyboard_shortcuts_get_from_key(int32_t key);
void keyboard_shortcuts_format_string(char* buffer, size_t bufferSize, int32_t shortcut);
void keyboard_shortcut_handle(int32_t key);
void keyboard_shortcut_handle_command(int32_t shortcutIndex);
void keyboard_shortcut_handle_command(OpenRCT2::Input::Shortcut shortcut);
void keyboard_shortcut_format_string(char* buffer, size_t size, uint16_t shortcutKey);
ScreenCoordsXY get_keyboard_map_scroll(const uint8_t* keysState);

View File

@ -70,13 +70,13 @@ static rct_window_event_list window_shortcut_change_events = {
static rct_string_id CurrentShortcutKeyStringId{};
rct_window* window_shortcut_change_open(int32_t selected_key, rct_string_id key_string_id)
rct_window* window_shortcut_change_open(Input::Shortcut shortcut, rct_string_id key_string_id)
{
// Move this to window_shortcut_change_open
window_close_by_class(WC_CHANGE_KEYBOARD_SHORTCUT);
// Save the item we are selecting for new window
gKeyboardShortcutChangeId = selected_key;
gKeyboardShortcutChangeId = shortcut;
CurrentShortcutKeyStringId = key_string_id;
rct_window* w = window_create_centred(WW, WH, &window_shortcut_change_events, WC_CHANGE_KEYBOARD_SHORTCUT, 0);

View File

@ -22,6 +22,8 @@ static constexpr const int32_t WH = 280;
static constexpr const int32_t WW_SC_MAX = 1200;
static constexpr const int32_t WH_SC_MAX = 800;
using namespace OpenRCT2;
// clang-format off
enum WINDOW_SHORTCUT_WIDGET_IDX {
WIDX_BACKGROUND,
@ -81,133 +83,133 @@ static rct_window_event_list window_shortcut_events = {
struct ShortcutStringPair
{
KeyboardShortcut ShortcutId;
Input::Shortcut ShortcutId;
rct_string_id StringId;
};
static const ShortcutStringPair ShortcutList[] =
{
{ SHORTCUT_CLOSE_TOP_MOST_WINDOW, STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW },
{ SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS, STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS },
{ SHORTCUT_CANCEL_CONSTRUCTION_MODE, STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE },
{ SHORTCUT_REMOVE_TOP_BOTTOM_TOOLBAR_TOGGLE, STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS },
{ Input::Shortcut::CloseTopMostWindow, STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW },
{ Input::Shortcut::CloseAllFloatingWindows, STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS },
{ Input::Shortcut::CancelConstructionMode, STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE },
{ Input::Shortcut::RemoveTopBottomToolbarToggle, STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_PAUSE_GAME, STR_SHORTCUT_PAUSE_GAME },
{ SHORTCUT_REDUCE_GAME_SPEED, STR_SHORTCUT_REDUCE_GAME_SPEED },
{ SHORTCUT_INCREASE_GAME_SPEED, STR_SHORTCUT_INCREASE_GAME_SPEED },
{ SHORTCUT_LOAD_GAME, STR_LOAD_GAME },
{ SHORTCUT_QUICK_SAVE_GAME, STR_SHORTCUT_QUICK_SAVE_GAME },
{ SHORTCUT_SHOW_OPTIONS, STR_SHORTCUT_SHOW_OPTIONS },
{ SHORTCUT_SCREENSHOT, STR_SHORTCUT_SCREENSHOT },
{ SHORTCUT_MUTE_SOUND, STR_SHORTCUT_MUTE_SOUND },
{ Input::Shortcut::PauseGame, STR_SHORTCUT_PAUSE_GAME },
{ Input::Shortcut::ReduceGameSpeed, STR_SHORTCUT_REDUCE_GAME_SPEED },
{ Input::Shortcut::IncreaseGameSpeed, STR_SHORTCUT_INCREASE_GAME_SPEED },
{ Input::Shortcut::LoadGame, STR_LOAD_GAME },
{ Input::Shortcut::QuickSaveGame, STR_SHORTCUT_QUICK_SAVE_GAME },
{ Input::Shortcut::ShowOptions, STR_SHORTCUT_SHOW_OPTIONS },
{ Input::Shortcut::Screenshot, STR_SHORTCUT_SCREENSHOT },
{ Input::Shortcut::MuteSound, STR_SHORTCUT_MUTE_SOUND },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_OPEN_CHEAT_WINDOW, STR_SHORTCUT_OPEN_CHEATS_WINDOW },
{ SHORTCUT_TOGGLE_CLEARANCE_CHECKS, STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS },
{ Input::Shortcut::OpenCheatWindow, STR_SHORTCUT_OPEN_CHEATS_WINDOW },
{ Input::Shortcut::ToggleClearanceChecks, STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_ZOOM_VIEW_OUT, STR_SHORTCUT_ZOOM_VIEW_OUT },
{ SHORTCUT_ZOOM_VIEW_IN, STR_SHORTCUT_ZOOM_VIEW_IN },
{ SHORTCUT_ROTATE_VIEW_CLOCKWISE, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE },
{ SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE },
{ SHORTCUT_SHOW_MAP, STR_SHORTCUT_SHOW_MAP },
{ Input::Shortcut::ZoomViewOut, STR_SHORTCUT_ZOOM_VIEW_OUT },
{ Input::Shortcut::ZoomViewIn, STR_SHORTCUT_ZOOM_VIEW_IN },
{ Input::Shortcut::RotateViewClockwise, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE },
{ Input::Shortcut::RotateViewAnticlockwise, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE },
{ Input::Shortcut::ShowMap, STR_SHORTCUT_SHOW_MAP },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_CLEAR_SCENERY, STR_SHORTCUT_CLEAR_SCENERY },
{ SHORTCUT_ADJUST_LAND, STR_SHORTCUT_ADJUST_LAND },
{ SHORTCUT_ADJUST_WATER, STR_SHORTCUT_ADJUST_WATER },
{ SHORTCUT_BUILD_SCENERY, STR_SHORTCUT_BUILD_SCENERY },
{ SHORTCUT_BUILD_PATHS, STR_SHORTCUT_BUILD_PATHS },
{ SHORTCUT_BUILD_NEW_RIDE, STR_SHORTCUT_BUILD_NEW_RIDE },
{ Input::Shortcut::ClearScenery, STR_SHORTCUT_CLEAR_SCENERY },
{ Input::Shortcut::AdjustLand, STR_SHORTCUT_ADJUST_LAND },
{ Input::Shortcut::AdjustWater, STR_SHORTCUT_ADJUST_WATER },
{ Input::Shortcut::BuildScenery, STR_SHORTCUT_BUILD_SCENERY },
{ Input::Shortcut::BuildPaths, STR_SHORTCUT_BUILD_PATHS },
{ Input::Shortcut::BuildNewRide, STR_SHORTCUT_BUILD_NEW_RIDE },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_SHOW_FINANCIAL_INFORMATION, STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION },
{ SHORTCUT_SHOW_RESEARCH_INFORMATION, STR_SHORTCUT_SHOW_RESEARCH_INFORMATION },
{ SHORTCUT_SHOW_RIDES_LIST, STR_SHORTCUT_SHOW_RIDES_LIST },
{ SHORTCUT_SHOW_PARK_INFORMATION, STR_SHORTCUT_SHOW_PARK_INFORMATION },
{ SHORTCUT_SHOW_GUEST_LIST, STR_SHORTCUT_SHOW_GUEST_LIST },
{ SHORTCUT_SHOW_STAFF_LIST, STR_SHORTCUT_SHOW_STAFF_LIST },
{ SHORTCUT_SHOW_RECENT_MESSAGES, STR_SHORTCUT_SHOW_RECENT_MESSAGES },
{ Input::Shortcut::ShowFinancialInformation, STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION },
{ Input::Shortcut::ShowResearchInformation, STR_SHORTCUT_SHOW_RESEARCH_INFORMATION },
{ Input::Shortcut::ShowRidesList, STR_SHORTCUT_SHOW_RIDES_LIST },
{ Input::Shortcut::ShowParkInformation, STR_SHORTCUT_SHOW_PARK_INFORMATION },
{ Input::Shortcut::ShowGuestList, STR_SHORTCUT_SHOW_GUEST_LIST },
{ Input::Shortcut::ShowStaffList, STR_SHORTCUT_SHOW_STAFF_LIST },
{ Input::Shortcut::ShowRecentMessages, STR_SHORTCUT_SHOW_RECENT_MESSAGES },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_SHOW_MULTIPLAYER, STR_SHORTCUT_SHOW_MULTIPLAYER },
{ SHORTCUT_OPEN_CHAT_WINDOW, STR_SEND_MESSAGE },
{ Input::Shortcut::ShowMultiplayer, STR_SHORTCUT_SHOW_MULTIPLAYER },
{ Input::Shortcut::OpenChatWindow, STR_SEND_MESSAGE },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_UNDERGROUND_VIEW_TOGGLE, STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE },
{ SHORTCUT_REMOVE_BASE_LAND_TOGGLE, STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE },
{ SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE, STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE },
{ SHORTCUT_SEE_THROUGH_RIDES_TOGGLE, STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE },
{ SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE, STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE },
{ SHORTCUT_SEE_THROUGH_PATHS_TOGGLE, STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE },
{ SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE, STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE },
{ SHORTCUT_INVISIBLE_PEOPLE_TOGGLE, STR_SHORTCUT_INVISIBLE_PEOPLE_TOGGLE },
{ SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE, STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE },
{ SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE, STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE },
{ SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE, STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE },
{ SHORTCUT_VIEW_CLIPPING, STR_SHORTCUT_VIEW_CLIPPING },
{ SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE },
{ SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE },
{ Input::Shortcut::UndergroundViewToggle, STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE },
{ Input::Shortcut::RemoveBaseLandToggle, STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE },
{ Input::Shortcut::RemoveVerticalLandToggle, STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE },
{ Input::Shortcut::SeeThroughRidesToggle, STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE },
{ Input::Shortcut::SeeThroughSceneryToggle, STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE },
{ Input::Shortcut::SeeThroughPathsToggle, STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE },
{ Input::Shortcut::InvisibleSupportsToggle, STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE },
{ Input::Shortcut::InvisiblePeopleToggle, STR_SHORTCUT_INVISIBLE_PEOPLE_TOGGLE },
{ Input::Shortcut::HeightMarksOnLandToggle, STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE },
{ Input::Shortcut::HeightMarksOnRideTracksToggle, STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE },
{ Input::Shortcut::HeightMarksOnPathsToggle, STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE },
{ Input::Shortcut::ViewClipping, STR_SHORTCUT_VIEW_CLIPPING },
{ Input::Shortcut::HighlightPathIssuesToggle, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE },
{ Input::Shortcut::GridlinesDisplayToggle, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_SCENERY_PICKER, STR_SHORTCUT_OPEN_SCENERY_PICKER },
{ SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT },
{ SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT },
{ SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT },
{ SHORTCUT_RIDE_CONSTRUCTION_USE_TRACK_DEFAULT, STR_SHORTCUT_RIDE_CONSTRUCTION_USE_TRACK_DEFAULT },
{ SHORTCUT_RIDE_CONSTRUCTION_SLOPE_DOWN, STR_SHORTCUT_RIDE_CONSTRUCTION_SLOPE_DOWN },
{ SHORTCUT_RIDE_CONSTRUCTION_SLOPE_UP, STR_SHORTCUT_RIDE_CONSTRUCTION_SLOPE_UP },
{ SHORTCUT_RIDE_CONSTRUCTION_CHAIN_LIFT_TOGGLE, STR_SHORTCUT_RIDE_CONSTRUCTION_CHAIN_LIFT_TOGGLE },
{ SHORTCUT_RIDE_CONSTRUCTION_BANK_LEFT, STR_SHORTCUT_RIDE_CONSTRUCTION_BANK_LEFT },
{ SHORTCUT_RIDE_CONSTRUCTION_BANK_RIGHT, STR_SHORTCUT_RIDE_CONSTRUCTION_BANK_RIGHT },
{ SHORTCUT_RIDE_CONSTRUCTION_PREVIOUS_TRACK, STR_SHORTCUT_RIDE_CONSTRUCTION_PREVIOUS_TRACK },
{ SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK, STR_SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK },
{ SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT, STR_SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT },
{ SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT, STR_SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT },
{ Input::Shortcut::SceneryPicker, STR_SHORTCUT_OPEN_SCENERY_PICKER },
{ Input::Shortcut::RotateConstructionObject, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT },
{ Input::Shortcut::RideConstructionTurnLeft, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT },
{ Input::Shortcut::RideConstructionTurnRight, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT },
{ Input::Shortcut::RideConstructionUseTrackDefault, STR_SHORTCUT_RIDE_CONSTRUCTION_USE_TRACK_DEFAULT },
{ Input::Shortcut::RideConstructionSlopeDown, STR_SHORTCUT_RIDE_CONSTRUCTION_SLOPE_DOWN },
{ Input::Shortcut::RideConstructionSlopeUp, STR_SHORTCUT_RIDE_CONSTRUCTION_SLOPE_UP },
{ Input::Shortcut::RideConstructionChainLiftToggle, STR_SHORTCUT_RIDE_CONSTRUCTION_CHAIN_LIFT_TOGGLE },
{ Input::Shortcut::RideConstructionBankLeft, STR_SHORTCUT_RIDE_CONSTRUCTION_BANK_LEFT },
{ Input::Shortcut::RideConstructionBankRight, STR_SHORTCUT_RIDE_CONSTRUCTION_BANK_RIGHT },
{ Input::Shortcut::RideConstructionPreviousTrack, STR_SHORTCUT_RIDE_CONSTRUCTION_PREVIOUS_TRACK },
{ Input::Shortcut::RideConstructionNextTrack, STR_SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK },
{ Input::Shortcut::RideConstructionBuildCurrent, STR_SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT },
{ Input::Shortcut::RideConstructionDemolishCurrent, STR_SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_SCROLL_MAP_UP, STR_SHORTCUT_SCROLL_MAP_UP },
{ SHORTCUT_SCROLL_MAP_LEFT, STR_SHORTCUT_SCROLL_MAP_LEFT },
{ SHORTCUT_SCROLL_MAP_DOWN, STR_SHORTCUT_SCROLL_MAP_DOWN },
{ SHORTCUT_SCROLL_MAP_RIGHT, STR_SHORTCUT_SCROLL_MAP_RIGHT },
{ Input::Shortcut::ScrollMapUp, STR_SHORTCUT_SCROLL_MAP_UP },
{ Input::Shortcut::ScrollMapLeft, STR_SHORTCUT_SCROLL_MAP_LEFT },
{ Input::Shortcut::ScrollMapDown, STR_SHORTCUT_SCROLL_MAP_DOWN },
{ Input::Shortcut::ScrollMapRight, STR_SHORTCUT_SCROLL_MAP_RIGHT },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_WINDOWED_MODE_TOGGLE, STR_SHORTCUT_WINDOWED_MODE_TOGGLE },
{ SHORTCUT_SCALE_UP, STR_SHORTCUT_SCALE_UP },
{ SHORTCUT_SCALE_DOWN, STR_SHORTCUT_SCALE_DOWN },
{ Input::Shortcut::WindowedModeToggle, STR_SHORTCUT_WINDOWED_MODE_TOGGLE },
{ Input::Shortcut::ScaleUp, STR_SHORTCUT_SCALE_UP },
{ Input::Shortcut::ScaleDown, STR_SHORTCUT_SCALE_DOWN },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_TILE_INSPECTOR, STR_SHORTCUT_OPEN_TILE_INSPECTOR },
{ SHORTCUT_INSERT_CORRUPT_ELEMENT, STR_SHORTCUT_INSERT_CORRPUT_ELEMENT },
{ SHORTCUT_COPY_ELEMENT, STR_SHORTCUT_COPY_ELEMENT },
{ SHORTCUT_PASTE_ELEMENT, STR_SHORTCUT_PASTE_ELEMENT },
{ SHORTCUT_REMOVE_ELEMENT, STR_SHORTCUT_REMOVE_ELEMENT },
{ SHORTCUT_MOVE_ELEMENT_UP, STR_SHORTCUT_MOVE_ELEMENT_UP },
{ SHORTCUT_MOVE_ELEMENT_DOWN, STR_SHORTCUT_MOVE_ELEMENT_DOWN },
{ SHORTCUT_INCREASE_X_COORD, STR_SHORTCUT_INCREASE_X_COORD },
{ SHORTCUT_DECREASE_X_COORD, STR_SHORTCUT_DECREASE_X_COORD },
{ SHORTCUT_INCREASE_Y_COORD, STR_SHORTCUT_INCREASE_Y_COORD },
{ SHORTCUT_DECREASE_Y_COORD, STR_SHORTCUT_DECREASE_Y_COORD },
{ SHORTCUT_INCREASE_ELEM_HEIGHT, STR_SHORTCUT_INCREASE_ELEM_HEIGHT },
{ SHORTCUT_DECREASE_ELEM_HEIGHT, STR_SHORTCUT_DECREASE_ELEM_HEIGHT },
{ Input::Shortcut::TileInspector, STR_SHORTCUT_OPEN_TILE_INSPECTOR },
{ Input::Shortcut::InsertCorruptElement, STR_SHORTCUT_INSERT_CORRPUT_ELEMENT },
{ Input::Shortcut::CopyElement, STR_SHORTCUT_COPY_ELEMENT },
{ Input::Shortcut::PasteElement, STR_SHORTCUT_PASTE_ELEMENT },
{ Input::Shortcut::RemoveElement, STR_SHORTCUT_REMOVE_ELEMENT },
{ Input::Shortcut::MoveElementUp, STR_SHORTCUT_MOVE_ELEMENT_UP },
{ Input::Shortcut::MoveElementDown, STR_SHORTCUT_MOVE_ELEMENT_DOWN },
{ Input::Shortcut::IncreaseXCoord, STR_SHORTCUT_INCREASE_X_COORD },
{ Input::Shortcut::DecreaseXCoord, STR_SHORTCUT_DECREASE_X_COORD },
{ Input::Shortcut::IncreaseYCoord, STR_SHORTCUT_INCREASE_Y_COORD },
{ Input::Shortcut::DecreaseYCoord, STR_SHORTCUT_DECREASE_Y_COORD },
{ Input::Shortcut::IncreaseElementHeight, STR_SHORTCUT_INCREASE_ELEM_HEIGHT },
{ Input::Shortcut::DecreaseElementHeight, STR_SHORTCUT_DECREASE_ELEM_HEIGHT },
{ SHORTCUT_UNDEFINED, STR_NONE },
{ Input::Shortcut::Undefined, STR_NONE },
{ SHORTCUT_ADVANCE_TO_NEXT_TICK, STR_ADVANCE_TO_NEXT_TICK },
{ SHORTCUT_PAINT_ORIGINAL_TOGGLE, STR_SHORTCUT_PAINT_ORIGINAL },
{ SHORTCUT_DEBUG_PAINT_TOGGLE, STR_SHORTCUT_DEBUG_PAINT_TOGGLE },
{ Input::Shortcut::AdvanceToNextTick, STR_ADVANCE_TO_NEXT_TICK },
{ Input::Shortcut::PaintOriginalToggle, STR_SHORTCUT_PAINT_ORIGINAL },
{ Input::Shortcut::DebugPaintToggle, STR_SHORTCUT_DEBUG_PAINT_TOGGLE },
};
// clang-format on
@ -302,7 +304,7 @@ static void window_shortcut_scrollmousedown(rct_window* w, int32_t scrollIndex,
return;
// Is this a separator?
if (ShortcutList[selected_item].ShortcutId == SHORTCUT_UNDEFINED)
if (ShortcutList[selected_item].ShortcutId == Input::Shortcut::Undefined)
return;
auto& shortcut = ShortcutList[selected_item];
@ -352,7 +354,7 @@ static void window_shortcut_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i
}
// Is this a separator?
if (ShortcutList[i].ShortcutId == SHORTCUT_UNDEFINED)
if (ShortcutList[i].ShortcutId == Input::Shortcut::Undefined)
{
const int32_t top = y + (SCROLLABLE_ROW_HEIGHT / 2) - 1;
gfx_fill_rect(dpi, { { 0, top }, { scrollWidth, top } }, ColourMapA[w->colours[0]].mid_dark);
@ -374,7 +376,7 @@ static void window_shortcut_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i
gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, { 0, y - 1 }, bindingOffset);
char keybinding[128];
keyboard_shortcuts_format_string(keybinding, 128, ShortcutList[i].ShortcutId);
keyboard_shortcuts_format_string(keybinding, 128, static_cast<int32_t>(ShortcutList[i].ShortcutId));
if (strlen(keybinding) > 0)
{

View File

@ -9,12 +9,14 @@
#pragma once
#include <openrct2-ui/input/KeyboardShortcuts.h>
#include <openrct2-ui/interface/Window.h>
#include <openrct2/common.h>
#include <openrct2/ride/Ride.h>
#include <openrct2/windows/tile_inspector.h>
#include <string_view>
using namespace OpenRCT2;
using loadsave_callback = void (*)(int32_t result, const utf8* path);
using scenarioselect_callback = void (*)(const utf8* path);
struct Peep;
@ -62,7 +64,7 @@ rct_window* window_save_prompt_open();
rct_window* window_server_list_open();
rct_window* window_server_start_open();
#endif
rct_window* window_shortcut_change_open(int32_t selected_key, rct_string_id key_string_id);
rct_window* window_shortcut_change_open(Input::Shortcut shortcut, rct_string_id key_string_id);
rct_window* window_shortcut_keys_open();
rct_window* window_staff_list_open();
rct_window* window_staff_open(Peep* peep);