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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user