1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Implement more InputManager

This commit is contained in:
Ted John
2020-12-14 23:12:19 +00:00
parent c8f31dea7f
commit ea975f88fc
6 changed files with 196 additions and 111 deletions

View File

@@ -420,6 +420,17 @@ void ShortcutManager::ProcessEvent(const InputEvent& e)
}
}
bool ShortcutManager::ProcessEventForSpecificShortcut(const InputEvent& e, std::string_view id)
{
auto shortcut = GetShortcut(id);
if (shortcut != nullptr && shortcut->Matches(e))
{
shortcut->Action();
return true;
}
return false;
}
static ShortcutManager _shortcutManager;
ShortcutManager& OpenRCT2::Ui::GetShortcutManager()