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

Fixed not working shortcuts on some buttons in main menu

This commit is contained in:
Ivan Savenko
2024-04-11 22:00:54 +03:00
parent 76fd271251
commit ac1c36b7e2
2 changed files with 8 additions and 3 deletions

View File

@@ -241,6 +241,11 @@ std::shared_ptr<CButton> CMenuEntry::createButton(CMenuScreen * parent, const Js
EShortcut shortcut = GH.shortcuts().findShortcut(button["shortcut"].String());
if (shortcut == EShortcut::NONE && !button["shortcut"].String().empty())
{
logGlobal->warn("Unknown shortcut '%s' found when loading main menu config!", button["shortcut"].String());
}
auto result = std::make_shared<CButton>(Point(posx, posy), AnimationPath::fromJson(button["name"]), help, command, shortcut);
if (button["center"].Bool())