1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

writing shortcuts

This commit is contained in:
Laserlicht
2025-07-19 15:19:09 +02:00
parent fb45c80621
commit 72e60c6600
9 changed files with 38 additions and 29 deletions

View File

@@ -91,8 +91,6 @@ void QuickSpellPanel::create()
{
OBJECT_CONSTRUCTION;
const JsonNode config = JsonUtils::assembleFromFiles("config/shortcutsConfig");
labels.clear();
buttons.clear();
buttonsDisabled.clear();
@@ -132,7 +130,7 @@ void QuickSpellPanel::create()
buttonsDisabled.push_back(std::make_shared<TransparentFilledRectangle>(Rect(2, 7 + 50 * i, 48, 36), ColorRGBA(0, 0, 0, 172)));
}
if(ENGINE->input().getCurrentInputMode() == InputMode::KEYBOARD_AND_MOUSE)
labels.push_back(std::make_shared<CLabel>(7, 10 + 50 * i, EFonts::FONT_TINY, ETextAlignment::TOPLEFT, Colors::WHITE, config["keyboard"]["battleSpellShortcut" + std::to_string(i)].String()));
labels.push_back(std::make_shared<CLabel>(7, 10 + 50 * i, EFonts::FONT_TINY, ETextAlignment::TOPLEFT, Colors::WHITE, shortcutsConfig["keyboard"]["battleSpellShortcut" + std::to_string(i)].String()));
buttons.push_back(button);
}