mirror of https://github.com/OpenRCT2/OpenRCT2.git
Move zoom and rotation to view tab
This commit is contained in:
parent
b3f6437092
commit
e383b6f6f7
|
@ -291,10 +291,10 @@ void InputManager::ProcessHoldEvents()
|
|||
auto& shortcutManager = GetShortcutManager();
|
||||
if (!shortcutManager.IsPendingShortcutChange())
|
||||
{
|
||||
ProcessViewScrollEvent(ShortcutId::ScrollUp, _scrollUpShortcut, { 0, -1 });
|
||||
ProcessViewScrollEvent(ShortcutId::ScrollDown, _scrollDownShortcut, { 0, 1 });
|
||||
ProcessViewScrollEvent(ShortcutId::ScrollLeft, _scrollLeftShortcut, { -1, 0 });
|
||||
ProcessViewScrollEvent(ShortcutId::ScrollRight, _scrollRightShortcut, { 1, 0 });
|
||||
ProcessViewScrollEvent(ShortcutId::ViewScrollUp, _scrollUpShortcut, { 0, -1 });
|
||||
ProcessViewScrollEvent(ShortcutId::ViewScrollDown, _scrollDownShortcut, { 0, 1 });
|
||||
ProcessViewScrollEvent(ShortcutId::ViewScrollLeft, _scrollLeftShortcut, { -1, 0 });
|
||||
ProcessViewScrollEvent(ShortcutId::ViewScrollRight, _scrollRightShortcut, { 1, 0 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,9 @@ namespace OpenRCT2::Ui::ShortcutId
|
|||
// Interface / general
|
||||
constexpr std::string_view InterfaceCloseTop = "interface.general.close_top";
|
||||
constexpr std::string_view InterfaceCloseAll = "interface.general.close_all";
|
||||
constexpr std::string_view InterfaceRotateConstruction = "interface.general.rotate_construction";
|
||||
constexpr std::string_view InterfaceCancelConstruction = "interface.general.cancel_construction";
|
||||
constexpr std::string_view InterfacePause = "interface.general.pause";
|
||||
constexpr std::string_view InterfaceZoomOut = "interface.general.zoom_out";
|
||||
constexpr std::string_view InterfaceZoomIn = "interface.general.zoom_in";
|
||||
constexpr std::string_view InterfaceRotateClockwise = "interface.general.rotate_clockwise";
|
||||
constexpr std::string_view InterfaceRotateAnticlockwise = "interface.general.rotate_anticlockwise";
|
||||
constexpr std::string_view InterfaceRotateConstruction = "interface.general.rotate_construction";
|
||||
constexpr std::string_view InterfaceDecreaseSpeed = "interface.misc.decrease_speed";
|
||||
constexpr std::string_view InterfaceIncreaseSpeed = "interface.misc.increase_speed";
|
||||
constexpr std::string_view InterfaceToggleToolbars = "interface.misc.toggle_toolbars";
|
||||
|
@ -34,12 +30,6 @@ namespace OpenRCT2::Ui::ShortcutId
|
|||
constexpr std::string_view InterfaceDisableClearance = "interface.misc.disable_clearance";
|
||||
constexpr std::string_view MultiplayerChat = "interface.misc.multiplayer_chat";
|
||||
|
||||
// Interface / scroll
|
||||
constexpr std::string_view ScrollUp = "view.scroll.up";
|
||||
constexpr std::string_view ScrollLeft = "view.scroll.left";
|
||||
constexpr std::string_view ScrollRight = "view.scroll.right";
|
||||
constexpr std::string_view ScrollDown = "view.scroll.down";
|
||||
|
||||
// Interface / graphics
|
||||
constexpr std::string_view ScaleToggleWindowMode = "interface.graphics.toggle_window_mode";
|
||||
constexpr std::string_view InterfaceScaleIncrease = "interface.graphics.increase";
|
||||
|
@ -65,21 +55,33 @@ namespace OpenRCT2::Ui::ShortcutId
|
|||
constexpr std::string_view InterfaceOpenTileInspector = "interface.open.tileinspector";
|
||||
constexpr std::string_view MultiplayerShow = "interface.open.multiplayer";
|
||||
|
||||
// View
|
||||
constexpr std::string_view ViewToggleUnderground = "view.show_underground";
|
||||
constexpr std::string_view ViewToggleBaseLand = "view.hide_base_land";
|
||||
constexpr std::string_view ViewToggleVerticalLand = "view.hide_vertical_land";
|
||||
constexpr std::string_view ViewToggleRides = "view.transparent_rides";
|
||||
constexpr std::string_view ViewToggleScenery = "view.transparent_scenery";
|
||||
constexpr std::string_view ViewToggleSupports = "view.hide_supports";
|
||||
constexpr std::string_view ViewTogglePeeps = "view.hide_peeps";
|
||||
constexpr std::string_view ViewToggleLandHeightMarkers = "view.show_land_height";
|
||||
constexpr std::string_view ViewToggleTrackHeightMarkers = "view.show_track_height";
|
||||
constexpr std::string_view ViewToggleFootpathHeightMarkers = "view.show_footpath_height";
|
||||
constexpr std::string_view ViewToggleFootpaths = "view.transparent_footpaths";
|
||||
constexpr std::string_view ViewToggleGridlines = "view.show_gridlines";
|
||||
constexpr std::string_view ViewToggleCutAway = "view.toggle_cut_away";
|
||||
constexpr std::string_view ViewToogleFootpathIssues = "view.highlight_path_issues";
|
||||
// View / general
|
||||
constexpr std::string_view ViewGeneralZoomOut = "view.general.zoom_out";
|
||||
constexpr std::string_view ViewGeneralZoomIn = "view.general.zoom_in";
|
||||
constexpr std::string_view ViewGeneralRotateClockwise = "view.general.rotate_clockwise";
|
||||
constexpr std::string_view ViewGeneralRotateAnticlockwise = "view.general.rotate_anticlockwise";
|
||||
|
||||
// View / scroll
|
||||
constexpr std::string_view ViewScrollUp = "view.scroll.up";
|
||||
constexpr std::string_view ViewScrollLeft = "view.scroll.left";
|
||||
constexpr std::string_view ViewScrollRight = "view.scroll.right";
|
||||
constexpr std::string_view ViewScrollDown = "view.scroll.down";
|
||||
|
||||
// View / toggle
|
||||
constexpr std::string_view ViewToggleUnderground = "view.toggle.show_underground";
|
||||
constexpr std::string_view ViewToggleBaseLand = "view.toggle.hide_base_land";
|
||||
constexpr std::string_view ViewToggleVerticalLand = "view.toggle.hide_vertical_land";
|
||||
constexpr std::string_view ViewToggleRides = "view.toggle.transparent_rides";
|
||||
constexpr std::string_view ViewToggleScenery = "view.toggle.transparent_scenery";
|
||||
constexpr std::string_view ViewToggleSupports = "view.toggle.hide_supports";
|
||||
constexpr std::string_view ViewTogglePeeps = "view.toggle.hide_peeps";
|
||||
constexpr std::string_view ViewToggleLandHeightMarkers = "view.toggle.show_land_height";
|
||||
constexpr std::string_view ViewToggleTrackHeightMarkers = "view.toggle.show_track_height";
|
||||
constexpr std::string_view ViewToggleFootpathHeightMarkers = "view.toggle.show_footpath_height";
|
||||
constexpr std::string_view ViewToggleFootpaths = "view.toggle.transparent_footpaths";
|
||||
constexpr std::string_view ViewToggleGridlines = "view.toggle.show_gridlines";
|
||||
constexpr std::string_view ViewToggleCutAway = "view.toggle.toggle_cut_away";
|
||||
constexpr std::string_view ViewToogleFootpathIssues = "view.toggle.highlight_path_issues";
|
||||
|
||||
// Window / ride construction
|
||||
constexpr std::string_view WindowRideConstructionTurnLeft = "window.rideconstruction.turn_left";
|
||||
|
|
|
@ -356,10 +356,10 @@ std::string_view ShortcutManager::GetLegacyShortcutId(size_t index)
|
|||
ShortcutId::InterfaceCloseAll,
|
||||
ShortcutId::InterfaceCancelConstruction,
|
||||
ShortcutId::InterfacePause,
|
||||
ShortcutId::InterfaceZoomOut,
|
||||
ShortcutId::InterfaceZoomIn,
|
||||
ShortcutId::InterfaceRotateClockwise,
|
||||
ShortcutId::InterfaceRotateAnticlockwise,
|
||||
ShortcutId::ViewGeneralZoomOut,
|
||||
ShortcutId::ViewGeneralZoomIn,
|
||||
ShortcutId::ViewGeneralRotateClockwise,
|
||||
ShortcutId::ViewGeneralRotateAnticlockwise,
|
||||
ShortcutId::InterfaceRotateConstruction,
|
||||
ShortcutId::ViewToggleUnderground,
|
||||
ShortcutId::ViewToggleBaseLand,
|
||||
|
@ -389,10 +389,10 @@ std::string_view ShortcutManager::GetLegacyShortcutId(size_t index)
|
|||
ShortcutId::InterfaceIncreaseSpeed,
|
||||
ShortcutId::InterfaceOpenCheats,
|
||||
ShortcutId::InterfaceToggleToolbars,
|
||||
ShortcutId::ScrollUp,
|
||||
ShortcutId::ScrollLeft,
|
||||
ShortcutId::ScrollRight,
|
||||
ShortcutId::ScrollDown,
|
||||
ShortcutId::ViewScrollUp,
|
||||
ShortcutId::ViewScrollLeft,
|
||||
ShortcutId::ViewScrollRight,
|
||||
ShortcutId::ViewScrollDown,
|
||||
ShortcutId::MultiplayerChat,
|
||||
ShortcutId::InterfaceSaveGame,
|
||||
ShortcutId::InterfaceShowOptions,
|
||||
|
|
|
@ -629,6 +629,7 @@ void ShortcutManager::RegisterDefaultShortcuts()
|
|||
window_close_top();
|
||||
}
|
||||
});
|
||||
RegisterShortcut(ShortcutId::InterfaceRotateConstruction, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, "Z", []() { ShortcutRotateConstructionObject(); });
|
||||
RegisterShortcut(ShortcutId::InterfaceCancelConstruction, STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE, "ESCAPE", []() {
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO))
|
||||
{
|
||||
|
@ -654,11 +655,6 @@ void ShortcutManager::RegisterDefaultShortcuts()
|
|||
}
|
||||
}
|
||||
});
|
||||
RegisterShortcut(ShortcutId::InterfaceZoomOut, STR_SHORTCUT_ZOOM_VIEW_OUT, "PAGEUP", []() { main_window_zoom(false, false); });
|
||||
RegisterShortcut(ShortcutId::InterfaceZoomIn, STR_SHORTCUT_ZOOM_VIEW_IN, "PAGEDOWN", []() { main_window_zoom(true, false); });
|
||||
RegisterShortcut(ShortcutId::InterfaceRotateClockwise, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE, "RETURN", "MOUSE 6", []() { RotateCamera(1); });
|
||||
RegisterShortcut(ShortcutId::InterfaceRotateAnticlockwise, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE, "SHIFT+RETURN", "MOUSE 5", []() { RotateCamera(-1); });
|
||||
RegisterShortcut(ShortcutId::InterfaceRotateConstruction, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, "Z", []() { ShortcutRotateConstructionObject(); });
|
||||
|
||||
RegisterShortcut(ShortcutId::ScaleToggleWindowMode, STR_SHORTCUT_WINDOWED_MODE_TOGGLE, "ALT+RETURN", []() { platform_toggle_windowed_mode(); });
|
||||
RegisterShortcut(ShortcutId::InterfaceScaleIncrease, STR_SHORTCUT_SCALE_UP, []() { ShortcutScaleUp(); });
|
||||
|
@ -715,6 +711,16 @@ void ShortcutManager::RegisterDefaultShortcuts()
|
|||
});
|
||||
|
||||
// View
|
||||
RegisterShortcut(ShortcutId::ViewGeneralZoomOut, STR_SHORTCUT_ZOOM_VIEW_OUT, "PAGEUP", []() { main_window_zoom(false, false); });
|
||||
RegisterShortcut(ShortcutId::ViewGeneralZoomIn, STR_SHORTCUT_ZOOM_VIEW_IN, "PAGEDOWN", []() { main_window_zoom(true, false); });
|
||||
RegisterShortcut(ShortcutId::ViewGeneralRotateClockwise, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE, "RETURN", "MOUSE 6", []() { RotateCamera(1); });
|
||||
RegisterShortcut(ShortcutId::ViewGeneralRotateAnticlockwise, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE, "SHIFT+RETURN", "MOUSE 5", []() { RotateCamera(-1); });
|
||||
|
||||
RegisterShortcut(ShortcutId::ViewScrollUp, STR_SHORTCUT_SCROLL_MAP_UP, "UP", []() { });
|
||||
RegisterShortcut(ShortcutId::ViewScrollLeft, STR_SHORTCUT_SCROLL_MAP_LEFT, "LEFT", []() { });
|
||||
RegisterShortcut(ShortcutId::ViewScrollRight, STR_SHORTCUT_SCROLL_MAP_RIGHT, "RIGHT", []() { });
|
||||
RegisterShortcut(ShortcutId::ViewScrollDown, STR_SHORTCUT_SCROLL_MAP_DOWN, "DOWN", []() { });
|
||||
|
||||
RegisterShortcut(ShortcutId::ViewToggleUnderground, STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE, "1", []() { ToggleViewFlag(VIEWPORT_FLAG_UNDERGROUND_INSIDE); });
|
||||
RegisterShortcut(ShortcutId::ViewToggleBaseLand, STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE, "H", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_BASE); });
|
||||
RegisterShortcut(ShortcutId::ViewToggleVerticalLand, STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE, "V", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_BASE); });
|
||||
|
@ -730,11 +736,6 @@ void ShortcutManager::RegisterDefaultShortcuts()
|
|||
RegisterShortcut(ShortcutId::ViewToogleFootpathIssues, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, "I", []() { ToggleViewFlag(VIEWPORT_FLAG_PATH_HEIGHTS); });
|
||||
RegisterShortcut(ShortcutId::ViewToggleGridlines, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, "7", []() { ToggleViewFlag(VIEWPORT_FLAG_GRIDLINES); });
|
||||
|
||||
RegisterShortcut(ShortcutId::ScrollUp, STR_SHORTCUT_SCROLL_MAP_UP, "UP", []() { });
|
||||
RegisterShortcut(ShortcutId::ScrollLeft, STR_SHORTCUT_SCROLL_MAP_LEFT, "LEFT", []() { });
|
||||
RegisterShortcut(ShortcutId::ScrollRight, STR_SHORTCUT_SCROLL_MAP_RIGHT, "RIGHT", []() { });
|
||||
RegisterShortcut(ShortcutId::ScrollDown, STR_SHORTCUT_SCROLL_MAP_DOWN, "DOWN", []() { });
|
||||
|
||||
// Window
|
||||
RegisterShortcut(ShortcutId::WindowRideConstructionTurnLeft, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_LEFT, "NUMPAD 4", []() { window_ride_construction_keyboard_shortcut_turn_left(); });
|
||||
RegisterShortcut(ShortcutId::WindowRideConstructionTurnRight, STR_SHORTCUT_RIDE_CONSTRUCTION_TURN_RIGHT, "NUMPAD 6", []() { window_ride_construction_keyboard_shortcut_turn_right(); });
|
||||
|
|
Loading…
Reference in New Issue