diff --git a/client/battle/BattleInterfaceClasses.cpp b/client/battle/BattleInterfaceClasses.cpp index 995146f1c..9837a071a 100644 --- a/client/battle/BattleInterfaceClasses.cpp +++ b/client/battle/BattleInterfaceClasses.cpp @@ -450,7 +450,7 @@ void QuickSpellPanel::create() if(!hero) return; - for(int i = 0; i < 16; i++) { + for(int i = 0; i < 12; i++) { std::string spellIdentifier = persistentStorage["quickSpell"][std::to_string(i)].String(); SpellID id; @@ -463,7 +463,7 @@ void QuickSpellPanel::create() id = SpellID::NONE; } - auto button = std::make_shared(Point(2, 5 + 37 * i), AnimationPath::builtin("spellint"), CButton::tooltip(), [this, id, hero](){ + auto button = std::make_shared(Point(2, 7 + 50 * i), AnimationPath::builtin("spellint"), CButton::tooltip(), [this, id, hero](){ if(id.hasValue() && id.toSpell()->canBeCast(owner.getBattle().get(), spells::Mode::HERO, hero)) { owner.castThisSpell(id); @@ -481,9 +481,9 @@ void QuickSpellPanel::create() if(!id.hasValue() || !id.toSpell()->canBeCast(owner.getBattle().get(), spells::Mode::HERO, hero)) { - buttonsDisabled.push_back(std::make_shared(Rect(2, 5 + 37 * i, 48, 36), ColorRGBA(0, 0, 0, 172))); + buttonsDisabled.push_back(std::make_shared(Rect(2, 7 + 50 * i, 48, 36), ColorRGBA(0, 0, 0, 172))); } - labels.push_back(std::make_shared(7, 8 + 37 * i, EFonts::FONT_TINY, ETextAlignment::TOPLEFT, Colors::WHITE, config["keyboard"]["battleSpellShortcut" + std::to_string(i)].String())); + labels.push_back(std::make_shared(7, 10 + 50 * i, EFonts::FONT_TINY, ETextAlignment::TOPLEFT, Colors::WHITE, config["keyboard"]["battleSpellShortcut" + std::to_string(i)].String())); buttons.push_back(button); } diff --git a/client/battle/BattleWindow.cpp b/client/battle/BattleWindow.cpp index ecfe285ce..fdc6b7fb7 100644 --- a/client/battle/BattleWindow.cpp +++ b/client/battle/BattleWindow.cpp @@ -77,10 +77,6 @@ BattleWindow::BattleWindow(BattleInterface & Owner): addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_9, [this](){ useSpellIfPossible(9); }); addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_10, [this](){ useSpellIfPossible(10); }); addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_11, [this](){ useSpellIfPossible(11); }); - addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_12, [this](){ useSpellIfPossible(12); }); - addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_13, [this](){ useSpellIfPossible(13); }); - addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_14, [this](){ useSpellIfPossible(14); }); - addShortcut(EShortcut::BATTLE_SPELL_SHORTCUT_15, [this](){ useSpellIfPossible(15); }); addShortcut(EShortcut::GLOBAL_OPTIONS, std::bind(&BattleWindow::bOptionsf, this)); addShortcut(EShortcut::BATTLE_SURRENDER, std::bind(&BattleWindow::bSurrenderf, this)); diff --git a/client/gui/Shortcut.h b/client/gui/Shortcut.h index 57027fa44..aedf695d9 100644 --- a/client/gui/Shortcut.h +++ b/client/gui/Shortcut.h @@ -199,10 +199,6 @@ enum class EShortcut BATTLE_SPELL_SHORTCUT_9, BATTLE_SPELL_SHORTCUT_10, BATTLE_SPELL_SHORTCUT_11, - BATTLE_SPELL_SHORTCUT_12, - BATTLE_SPELL_SHORTCUT_13, - BATTLE_SPELL_SHORTCUT_14, - BATTLE_SPELL_SHORTCUT_15, MARKET_DEAL, MARKET_MAX_AMOUNT, diff --git a/client/gui/ShortcutHandler.cpp b/client/gui/ShortcutHandler.cpp index 9e6ce0e96..259a1c6cb 100644 --- a/client/gui/ShortcutHandler.cpp +++ b/client/gui/ShortcutHandler.cpp @@ -235,10 +235,6 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const {"battleSpellShortcut9", EShortcut::BATTLE_SPELL_SHORTCUT_9 }, {"battleSpellShortcut10", EShortcut::BATTLE_SPELL_SHORTCUT_10 }, {"battleSpellShortcut11", EShortcut::BATTLE_SPELL_SHORTCUT_11 }, - {"battleSpellShortcut12", EShortcut::BATTLE_SPELL_SHORTCUT_12 }, - {"battleSpellShortcut13", EShortcut::BATTLE_SPELL_SHORTCUT_13 }, - {"battleSpellShortcut14", EShortcut::BATTLE_SPELL_SHORTCUT_14 }, - {"battleSpellShortcut15", EShortcut::BATTLE_SPELL_SHORTCUT_15 }, {"spectateTrackHero", EShortcut::SPECTATE_TRACK_HERO }, {"spectateSkipBattle", EShortcut::SPECTATE_SKIP_BATTLE }, {"spectateSkipBattleResult", EShortcut::SPECTATE_SKIP_BATTLE_RESULT }, diff --git a/config/shortcutsConfig.json b/config/shortcutsConfig.json index caf62161d..fddef65fe 100644 --- a/config/shortcutsConfig.json +++ b/config/shortcutsConfig.json @@ -73,14 +73,10 @@ "battleSpellShortcut5": "6", "battleSpellShortcut6": "7", "battleSpellShortcut7": "8", - "battleSpellShortcut8": "Shift+1", - "battleSpellShortcut9": "Shift+2", - "battleSpellShortcut10": "Shift+3", - "battleSpellShortcut11": "Shift+4", - "battleSpellShortcut12": "Shift+5", - "battleSpellShortcut13": "Shift+6", - "battleSpellShortcut14": "Shift+7", - "battleSpellShortcut15": "Shift+8", + "battleSpellShortcut8": "9", + "battleSpellShortcut9": "0", + "battleSpellShortcut10": "N", + "battleSpellShortcut11": "M", "battleSurrender": "S", "battleTacticsEnd": [ "Return", "Keypad Enter"], "battleTacticsNext": "Space",