impr: Various shortcut improvements

This commit is contained in:
WerWolv
2024-12-15 21:44:43 +01:00
parent 721164e562
commit 89090b25e3
8 changed files with 199 additions and 185 deletions

View File

@@ -279,7 +279,7 @@ namespace hex::plugin::builtin {
toolbarIndex
] = menuItem;
createNestedMenu(unlocalizedNames | std::views::drop(1), icon.glyph.c_str(), *shortcut, callback, enabledCallback, selectedCallack);
createNestedMenu(unlocalizedNames | std::views::drop(1), icon.glyph.c_str(), shortcut, callback, enabledCallback, selectedCallack);
}
}
@@ -535,7 +535,7 @@ namespace hex::plugin::builtin {
const auto &[unlocalizedNames, icon, shortcut, view, callback, enabledCallback, selectedCallback, toolbarIndex] = menuItem;
if (ImGui::BeginPopup(unlocalizedNames.front().get().c_str())) {
createNestedMenu({ unlocalizedNames.begin() + 1, unlocalizedNames.end() }, icon.glyph.c_str(), *shortcut, callback, enabledCallback, selectedCallback);
createNestedMenu({ unlocalizedNames.begin() + 1, unlocalizedNames.end() }, icon.glyph.c_str(), shortcut, callback, enabledCallback, selectedCallback);
ImGui::EndPopup();
}
}