Add shortcut key for sorting tile elements (#21636)

This commit is contained in:
Andrew 2024-03-22 10:24:10 -04:00 committed by GitHub
parent 693c422cd4
commit a972d231d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 8 additions and 0 deletions

View File

@ -3693,6 +3693,7 @@ STR_6620 :Object not found!
STR_6621 :Restrict
STR_6622 :Restrict object to the Scenario Editor and Sandbox mode.
STR_6623 :Type help for a list of available commands. Type hide to hide the console.
STR_6624 :Tile Inspector: Sort elements
#############
# Scenarios #

View File

@ -1,5 +1,6 @@
0.4.10 (in development)
------------------------------------------------------------------------
- Feature: [#21636] Add shortcut key for sorting tile elements.
- Improved: [#21424] Extra viewports can now rotate independently from the main viewport.
- Improved: [#21561, #21631] Enable more features in Android build (plugins, networking, multiplayer, audio formats).
- Improved: [#21599] Currency signs now use non-breaking spaces.

View File

@ -108,6 +108,7 @@ namespace OpenRCT2::Ui::ShortcutId
constexpr std::string_view WindowTileInspectorToggleInvisibility = "window.tileinspector.toggle_invisibility";
constexpr std::string_view WindowTileInspectorCopy = "window.tileinspector.copy";
constexpr std::string_view WindowTileInspectorPaste = "window.tileinspector.paste";
constexpr std::string_view WindowTileInspectorSort = "window.tileinspector.sort";
constexpr std::string_view WindowTileInspectorRemove = "window.tileinspector.remove";
constexpr std::string_view WindowTileInspectorMoveUp = "window.tileinspector.move_up";
constexpr std::string_view WindowTileInspectorMoveDown = "window.tileinspector.move_down";

View File

@ -883,6 +883,7 @@ void ShortcutManager::RegisterDefaultShortcuts()
RegisterShortcut(ShortcutId::WindowTileInspectorToggleInvisibility, STR_SHORTCUT_TOGGLE_INVISIBILITY, WindowTileInspectorKeyboardShortcutToggleInvisibility);
RegisterShortcut(ShortcutId::WindowTileInspectorCopy, STR_SHORTCUT_COPY_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_COPY));
RegisterShortcut(ShortcutId::WindowTileInspectorPaste, STR_SHORTCUT_PASTE_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE));
RegisterShortcut(ShortcutId::WindowTileInspectorSort, STR_SHORTCUT_SORT_ELEMENTS, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_SORT));
RegisterShortcut(ShortcutId::WindowTileInspectorRemove, STR_SHORTCUT_REMOVE_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE));
RegisterShortcut(ShortcutId::WindowTileInspectorMoveUp, STR_SHORTCUT_MOVE_ELEMENT_UP, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP));
RegisterShortcut(ShortcutId::WindowTileInspectorMoveDown, STR_SHORTCUT_MOVE_ELEMENT_DOWN, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN));

View File

@ -177,6 +177,7 @@ namespace OpenRCT2::Ui::Windows
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE == WIDX_BUTTON_ROTATE);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_COPY == WIDX_BUTTON_COPY);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE == WIDX_BUTTON_PASTE);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_SORT == WIDX_BUTTON_SORT);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE == WIDX_BUTTON_REMOVE);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP == WIDX_BUTTON_MOVE_UP);
static_assert(WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN == WIDX_BUTTON_MOVE_DOWN);

View File

@ -366,6 +366,7 @@ constexpr int32_t WC_STAFF__WIDX_PICKUP = 9;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE = 13;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_COPY = 16;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE = 15;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_SORT = 14;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE = 10;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP = 11;
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN = 12;

View File

@ -4037,6 +4037,8 @@ enum : uint16_t
STR_CONSOLE_HELPER_TEXT = 6623,
STR_SHORTCUT_SORT_ELEMENTS = 6624,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
};