Browse Source

fix + extended popup

Laserlicht 3 months ago
parent
commit
6e61cb0cf3

+ 1 - 1
Mods/vcmi/Content/config/english.json

@@ -262,7 +262,7 @@
 	"vcmi.shortcuts.button.hover" : "Shortcuts",
 	"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.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.joystickAxes" : "Joystick Axes",
 	"vcmi.shortcuts.group.joystickButtons" : "Joystick Buttons",

+ 1 - 1
Mods/vcmi/Content/config/german.json

@@ -262,7 +262,7 @@
 	"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.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.joystickAxes" : "Joystick-Achsen",
 	"vcmi.shortcuts.group.joystickButtons" : "Joystick-Tasten",

+ 1 - 1
client/windows/settings/AdventureOptionsTab.cpp

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

+ 1 - 0
client/windows/settings/ShortcutsWindow.cpp

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