feat: Fix sub menus, allow recent items to be collapsed

This commit is contained in:
WerWolv
2024-06-25 13:54:29 +02:00
parent c1561c7b6a
commit ba7c10f4b1
12 changed files with 108 additions and 74 deletions

View File

@@ -228,8 +228,7 @@ namespace hex::plugin::builtin {
void ViewHighlightRules::drawRulesConfig() {
ImGuiExt::BeginSubWindow("hex.builtin.view.highlight_rules.config"_lang, ImGui::GetContentRegionAvail());
{
if (ImGuiExt::BeginSubWindow("hex.builtin.view.highlight_rules.config"_lang, nullptr, ImGui::GetContentRegionAvail())) {
if (m_selectedRule != m_rules->end()) {
// Draw text input field for the rule name
@@ -297,8 +296,9 @@ namespace hex::plugin::builtin {
} else {
ImGuiExt::TextFormattedCentered("hex.builtin.view.highlight_rules.no_rule"_lang);
}
ImGuiExt::EndSubWindow();
}
ImGuiExt::EndSubWindow();
}