mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 07:26:39 +00:00 
			
		
		
		
	ActionManager::toggleMainMenu() should close PostProcessor HUD.
This commit is contained in:
		
							parent
							
								
									ab2931223e
								
							
						
					
					
						commit
						642d0ad631
					
				
					 4 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
					@ -129,6 +129,8 @@ namespace MWBase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            virtual bool isConsoleMode() const = 0;
 | 
					            virtual bool isConsoleMode() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            virtual bool isPostProcessorHudVisible() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            virtual void toggleVisible (MWGui::GuiWindow wnd) = 0;
 | 
					            virtual void toggleVisible (MWGui::GuiWindow wnd) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            virtual void forceHide(MWGui::GuiWindow wnd) = 0;
 | 
					            virtual void forceHide(MWGui::GuiWindow wnd) = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1520,6 +1520,11 @@ namespace MWGui
 | 
				
			||||||
        return mConsole && mConsole->isVisible();
 | 
					        return mConsole && mConsole->isVisible();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    bool WindowManager::isPostProcessorHudVisible() const
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return mPostProcessorHud->isVisible();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MWGui::GuiMode WindowManager::getMode() const
 | 
					    MWGui::GuiMode WindowManager::getMode() const
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (mGuiModes.empty())
 | 
					        if (mGuiModes.empty())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -169,6 +169,8 @@ namespace MWGui
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool isConsoleMode() const override;
 | 
					    bool isConsoleMode() const override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    bool isPostProcessorHudVisible() const override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void toggleVisible(GuiWindow wnd) override;
 | 
					    void toggleVisible(GuiWindow wnd) override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void forceHide(MWGui::GuiWindow wnd) override;
 | 
					    void forceHide(MWGui::GuiWindow wnd) override;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -323,6 +323,12 @@ namespace MWInput
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (MWBase::Environment::get().getWindowManager()->isPostProcessorHudVisible())
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            MWBase::Environment::get().getWindowManager()->togglePostProcessorHud();
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!MWBase::Environment::get().getWindowManager()->isGuiMode()) //No open GUIs, open up the MainMenu
 | 
					        if (!MWBase::Environment::get().getWindowManager()->isGuiMode()) //No open GUIs, open up the MainMenu
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
 | 
					            MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue