1
0
mirror of synced 2024-11-12 02:00:52 +01:00

Make Help view no longer appear in View menu

This commit is contained in:
WerWolv 2020-11-28 22:01:50 +01:00
parent c90ef343c1
commit 0890043bf4
3 changed files with 8 additions and 2 deletions

View File

@ -52,6 +52,8 @@ namespace hex {
ImGui::OpenPopup("Error");
}
virtual bool hasViewMenuItemEntry() { return true; }
bool& getWindowOpenState() {
return this->m_windowOpen;
}

View File

@ -22,6 +22,8 @@ namespace hex {
void createView() override;
void createMenu() override;
bool hasViewMenuItemEntry() override { return false; }
private:
bool m_aboutWindowOpen = false;
bool m_patternHelpWindowOpen = false;

View File

@ -127,8 +127,10 @@ namespace hex {
if (ImGui::BeginMenu(menu)) ImGui::EndMenu();
if (ImGui::BeginMenu("View")) {
for (auto &view : this->m_views)
for (auto &view : this->m_views) {
if (view->hasViewMenuItemEntry())
ImGui::MenuItem((view->getName() + " View").c_str(), "", &view->getWindowOpenState());
}
ImGui::EndMenu();
}