mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Disable some more menu items when they're not useful
This commit is contained in:
@@ -241,7 +241,9 @@ namespace hex {
|
||||
if (ImGui::MenuItem(Lang(name), shortcut.toString().c_str(), false, enabledCallback()))
|
||||
callback();
|
||||
} else {
|
||||
if (ImGui::BeginMenu(Lang(name), *(menuItems.begin() + 1) == ContentRegistry::Interface::impl::SubMenuValue ? enabledCallback() : true)) {
|
||||
bool isSubmenu = *(menuItems.begin() + 1) == ContentRegistry::Interface::impl::SubMenuValue;
|
||||
|
||||
if (ImGui::BeginMenu(Lang(name), isSubmenu ? enabledCallback() : true)) {
|
||||
createNestedMenu({ menuItems.begin() + 1, menuItems.end() }, shortcut, callback, enabledCallback);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user