1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Integrated shortcuts into adventure window configuration

This commit is contained in:
Ivan Savenko
2023-05-02 16:09:36 +03:00
parent 0000541291
commit 019d7b6811
12 changed files with 529 additions and 448 deletions

View File

@@ -79,8 +79,8 @@ std::vector<EShortcut> ShortcutHandler::translateKeycode(SDL_Keycode key) const
{SDLK_TAB, EShortcut::GAME_ACTIVATE_CONSOLE },
{SDLK_o, EShortcut::ADVENTURE_GAME_OPTIONS },
{SDLK_F6, EShortcut::ADVENTURE_TOGGLE_GRID },
{SDLK_z, EShortcut::ADVENTURE_TOGGLE_SLEEP },
{SDLK_w, EShortcut::ADVENTURE_TOGGLE_SLEEP },
{SDLK_z, EShortcut::ADVENTURE_SET_HERO_ASLEEP },
{SDLK_w, EShortcut::ADVENTURE_SET_HERO_AWAKE },
{SDLK_m, EShortcut::ADVENTURE_MOVE_HERO },
{SDLK_SPACE, EShortcut::ADVENTURE_VISIT_OBJECT },
{SDLK_KP_1, EShortcut::ADVENTURE_MOVE_HERO_SW },
@@ -110,7 +110,6 @@ std::vector<EShortcut> ShortcutHandler::translateKeycode(SDL_Keycode key) const
{SDLK_k, EShortcut::ADVENTURE_KINGDOM_OVERVIEW},
{SDLK_q, EShortcut::ADVENTURE_QUEST_LOG },
{SDLK_c, EShortcut::ADVENTURE_CAST_SPELL },
{SDLK_e, EShortcut::ADVENTURE_END_TURN },
{SDLK_g, EShortcut::ADVENTURE_THIEVES_GUILD },
{SDLK_q, EShortcut::BATTLE_TOGGLE_QUEUE },
{SDLK_c, EShortcut::BATTLE_USE_CREATURE_SPELL },
@@ -218,6 +217,8 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const
{"adventureGameOptions", EShortcut::ADVENTURE_GAME_OPTIONS },
{"adventureToggleGrid", EShortcut::ADVENTURE_TOGGLE_GRID },
{"adventureToggleSleep", EShortcut::ADVENTURE_TOGGLE_SLEEP },
{"adventureSetHeroAsleep", EShortcut::ADVENTURE_SET_HERO_ASLEEP },
{"adventureSetHeroAwake", EShortcut::ADVENTURE_SET_HERO_AWAKE },
{"adventureMoveHero", EShortcut::ADVENTURE_MOVE_HERO },
{"adventureVisitObject", EShortcut::ADVENTURE_VISIT_OBJECT },
{"adventureMoveHeroSW", EShortcut::ADVENTURE_MOVE_HERO_SW },
@@ -242,7 +243,6 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const
{"adventureKingdomOverview", EShortcut::ADVENTURE_KINGDOM_OVERVIEW},
{"adventureQuestLog", EShortcut::ADVENTURE_QUEST_LOG },
{"adventureCastSpell", EShortcut::ADVENTURE_CAST_SPELL },
{"adventureEndTurn", EShortcut::ADVENTURE_END_TURN },
{"adventureThievesGuild", EShortcut::ADVENTURE_THIEVES_GUILD },
{"battleToggleQueue", EShortcut::BATTLE_TOGGLE_QUEUE },
{"battleUseCreatureSpell", EShortcut::BATTLE_USE_CREATURE_SPELL },
@@ -278,85 +278,3 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const
return shortcutNames.at(identifier);
return EShortcut::NONE;
}