1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Remove old shortcut code and fix issues

This commit is contained in:
Ted John
2021-01-16 18:04:58 +00:00
parent f2f658bf28
commit 2b3aabb8e4
15 changed files with 46 additions and 584 deletions

View File

@@ -9,11 +9,11 @@
#include "WindowManager.h"
#include "input/KeyboardShortcuts.h"
#include "interface/Theme.h"
#include "windows/Window.h"
#include <openrct2-ui/input/InputManager.h>
#include <openrct2-ui/input/ShortcutManager.h>
#include <openrct2-ui/windows/Window.h>
#include <openrct2/Input.h>
#include <openrct2/config/Config.h>
@@ -520,11 +520,11 @@ public:
inputManager.Process();
}
std::string GetKeyboardShortcutString(int32_t shortcut) override
std::string GetKeyboardShortcutString(std::string_view shortcutId) override
{
utf8 buffer[256];
KeyboardShortcutsFormatString(buffer, sizeof(buffer), shortcut);
return std::string(buffer);
auto& shortcutManager = GetShortcutManager();
auto* shortcut = shortcutManager.GetShortcut(shortcutId);
return shortcut != nullptr ? shortcut->GetDisplayString() : std::string();
}
void SetMainView(const ScreenCoordsXY& viewPos, ZoomLevel zoom, int32_t rotation) override