1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

fix + extended popup

This commit is contained in:
Laserlicht
2025-07-18 23:41:06 +02:00
parent 0f44aa061e
commit 6e61cb0cf3
4 changed files with 4 additions and 3 deletions

View File

@@ -262,7 +262,7 @@
"vcmi.shortcuts.button.hover" : "Shortcuts", "vcmi.shortcuts.button.hover" : "Shortcuts",
"vcmi.shortcuts.button.help" : "{Shortcuts}\n\nShow menu for viewing and adjusting shortcuts and keybindings", "vcmi.shortcuts.button.help" : "{Shortcuts}\n\nShow menu for viewing and adjusting shortcuts and keybindings",
"vcmi.shortcuts.editButton.help" : "Edit key binding", "vcmi.shortcuts.editButton.help" : "Edit key binding",
"vcmi.shortcuts.editButton.popup" : "You want to change keybinding for {%s}?\n\nSadly setting the key binding here is not supported yet. Bindings has to configured over {shortcutsConfig.json} in config folder.", "vcmi.shortcuts.editButton.popup" : "You want to change keybinding for {%s}?\n\nSadly setting the key binding here is not supported yet. Bindings has to configured over {shortcutsConfig.json} in config folder. You need to add the key {%s}.",
"vcmi.shortcuts.group.keyboard" : "Keyboard", "vcmi.shortcuts.group.keyboard" : "Keyboard",
"vcmi.shortcuts.group.joystickAxes" : "Joystick Axes", "vcmi.shortcuts.group.joystickAxes" : "Joystick Axes",
"vcmi.shortcuts.group.joystickButtons" : "Joystick Buttons", "vcmi.shortcuts.group.joystickButtons" : "Joystick Buttons",

View File

@@ -262,7 +262,7 @@
"vcmi.shortcuts.button.hover" : "Tastenkürzel", "vcmi.shortcuts.button.hover" : "Tastenkürzel",
"vcmi.shortcuts.button.help" : "{Tastenkürzel}\n\nMenü zum Anzeigen und Anpassen von Tastenkürzeln und Tastenbelegungen anzeigen", "vcmi.shortcuts.button.help" : "{Tastenkürzel}\n\nMenü zum Anzeigen und Anpassen von Tastenkürzeln und Tastenbelegungen anzeigen",
"vcmi.shortcuts.editButton.help" : "Tastenbelegung bearbeiten", "vcmi.shortcuts.editButton.help" : "Tastenbelegung bearbeiten",
"vcmi.shortcuts.editButton.popup" : "Möchten Sie die Tastenbelegung für {%s} ändern?\n\nLeider wird das Festlegen der Tastenbelegung hier noch nicht unterstützt. Die Belegung muss über die {shortcutsConfig.json} im Konfigurationsordner eingestellt werden.", "vcmi.shortcuts.editButton.popup" : "Möchten Sie die Tastenbelegung für {%s} ändern?\n\nLeider wird das Festlegen der Tastenbelegung hier noch nicht unterstützt. Die Belegung muss über die {shortcutsConfig.json} im Konfigurationsordner eingestellt werden. Sie müssen den Schlüssel {%s} hinzufügen.",
"vcmi.shortcuts.group.keyboard" : "Tastatur", "vcmi.shortcuts.group.keyboard" : "Tastatur",
"vcmi.shortcuts.group.joystickAxes" : "Joystick-Achsen", "vcmi.shortcuts.group.joystickAxes" : "Joystick-Achsen",
"vcmi.shortcuts.group.joystickButtons" : "Joystick-Tasten", "vcmi.shortcuts.group.joystickButtons" : "Joystick-Tasten",

View File

@@ -164,7 +164,7 @@ AdventureOptionsTab::AdventureOptionsTab()
GAME->interface()->localState->erasePath(GAME->interface()->localState->getCurrentHero()); GAME->interface()->localState->erasePath(GAME->interface()->localState->getCurrentHero());
ENGINE->windows().totalRedraw(); ENGINE->windows().totalRedraw();
}); });
addCallback("openShortcutMenu", [this](int dummyValue) addCallback("openShortcutMenu", [](int dummyValue)
{ {
ENGINE->windows().createAndPushWindow<ShortcutsWindow>(); ENGINE->windows().createAndPushWindow<ShortcutsWindow>();
}); });

View File

@@ -112,6 +112,7 @@ ShortcutElement::ShortcutElement(std::string id, JsonNode keys, int elem)
buttonEdit->addCallback([id](){ buttonEdit->addCallback([id](){
auto str = MetaString::createFromTextID("vcmi.shortcuts.editButton.popup"); auto str = MetaString::createFromTextID("vcmi.shortcuts.editButton.popup");
str.replaceTextID("vcmi.shortcuts.shortcut." + id); str.replaceTextID("vcmi.shortcuts.shortcut." + id);
str.replaceRawString(id);
CInfoWindow::showInfoDialog(str.toString(), {}); CInfoWindow::showInfoDialog(str.toString(), {});
}); });
if(elem < MAX_LINES - 1) if(elem < MAX_LINES - 1)