Make Help view no longer appear in View menu
This commit is contained in:
parent
c90ef343c1
commit
0890043bf4
@ -52,6 +52,8 @@ namespace hex {
|
||||
ImGui::OpenPopup("Error");
|
||||
}
|
||||
|
||||
virtual bool hasViewMenuItemEntry() { return true; }
|
||||
|
||||
bool& getWindowOpenState() {
|
||||
return this->m_windowOpen;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user