diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index e7295d65fc..667ec0f871 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3727,6 +3727,7 @@ STR_6263 :{SMALLFONT}{BLACK}Toggle all sound on/off STR_6264 :Always use system file browser STR_6265 :{SMALLFONT}{BLACK}When enabled, your operating system's file browser will be used instead of OpenRCT2's. STR_6266 :Open custom content folder +STR_6267 :Open tile inspector ############# # Scenarios # diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 51f71aa60c..63a6f8d90a 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -8,6 +8,7 @@ - Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab. - Improved: [#7930] Automatically create folders for custom content. - Improved: [#7980] Show the full path of the scenario in the scenario select window. +- Improved: [#7993] Allow assigning a keyboard shortcut for opening the tile inspector. - Removed: [#7929] Support for scenario text objects. 0.2.1 (2018-08-26) diff --git a/src/openrct2-ui/input/KeyboardShortcut.cpp b/src/openrct2-ui/input/KeyboardShortcut.cpp index ec48c32e8f..8c383a6b91 100644 --- a/src/openrct2-ui/input/KeyboardShortcut.cpp +++ b/src/openrct2-ui/input/KeyboardShortcut.cpp @@ -749,6 +749,14 @@ static void shortcut_highlight_path_issues_toggle() toggle_view_flag(VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES); } +static void shortcut_open_tile_inspector() +{ + if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO || !gConfigGeneral.debugging_tools) + return; + + context_open_window(WC_TILE_INSPECTOR); +} + namespace { const shortcut_action shortcut_table[SHORTCUT_COUNT] = { @@ -821,6 +829,7 @@ namespace shortcut_gridlines_toggle, shortcut_view_clipping, shortcut_highlight_path_issues_toggle, + shortcut_open_tile_inspector, }; } // anonymous namespace diff --git a/src/openrct2-ui/input/KeyboardShortcuts.cpp b/src/openrct2-ui/input/KeyboardShortcuts.cpp index 14d88eaaa6..5beb357027 100644 --- a/src/openrct2-ui/input/KeyboardShortcuts.cpp +++ b/src/openrct2-ui/input/KeyboardShortcuts.cpp @@ -316,4 +316,5 @@ const uint16_t KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = { SDL_SCANCODE_7, // SHORTCUT_GRIDLINES_DISPLAY_TOGGLE SHORTCUT_UNDEFINED, // SHORTCUT_VIEW_CLIPPING SDL_SCANCODE_I, // SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE + SHORTCUT_UNDEFINED, // SHORTCUT_TILE_INSPECTOR }; diff --git a/src/openrct2-ui/input/KeyboardShortcuts.h b/src/openrct2-ui/input/KeyboardShortcuts.h index 9812a4fee9..dbe64c7f26 100644 --- a/src/openrct2-ui/input/KeyboardShortcuts.h +++ b/src/openrct2-ui/input/KeyboardShortcuts.h @@ -93,6 +93,7 @@ enum SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, SHORTCUT_VIEW_CLIPPING, SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, + SHORTCUT_TILE_INSPECTOR, SHORTCUT_COUNT, diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index a807d50bdd..53f3dc6652 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -148,6 +148,7 @@ const rct_string_id ShortcutStringIds[SHORTCUT_COUNT] = { STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, STR_SHORTCUT_VIEW_CLIPPING, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, + STR_SHORTCUT_OPEN_TILE_INSPECTOR, }; // clang-format on diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index c982ac0949..d73f33b518 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3893,6 +3893,8 @@ enum STR_OPEN_USER_CONTENT_FOLDER = 6266, + STR_SHORTCUT_OPEN_TILE_INSPECTOR = 6267, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 };