From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/gui/mainmenumanager.h | 48 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'src/gui/mainmenumanager.h') diff --git a/src/gui/mainmenumanager.h b/src/gui/mainmenumanager.h index e2107ab64..102492255 100644 --- a/src/gui/mainmenumanager.h +++ b/src/gui/mainmenumanager.h @@ -54,7 +54,7 @@ public: } #endif - if (!m_stack.empty()) + if(!m_stack.empty()) m_stack.back()->setVisible(false); m_stack.push_back(menu); } @@ -68,32 +68,35 @@ public: assert(*i == menu); m_stack.erase(i);*/ - if (!m_stack.empty()) + if(!m_stack.empty()) m_stack.back()->setVisible(true); } // Returns true to prevent further processing - virtual bool preprocessEvent(const SEvent &event) + virtual bool preprocessEvent(const SEvent& event) { if (m_stack.empty()) return false; - GUIModalMenu *mm = dynamic_cast(m_stack.back()); + GUIModalMenu *mm = dynamic_cast(m_stack.back()); return mm && mm->preprocessEvent(event); } - u32 menuCount() { return m_stack.size(); } + u32 menuCount() + { + return m_stack.size(); + } bool pausesGame() { for (gui::IGUIElement *i : m_stack) { - GUIModalMenu *mm = dynamic_cast(i); + GUIModalMenu *mm = dynamic_cast(i); if (mm && mm->pausesGame()) return true; } return false; } - std::list m_stack; + std::list m_stack; }; extern MainMenuManager g_menumgr; @@ -106,17 +109,36 @@ public: MainGameCallback() = default; virtual ~MainGameCallback() = default; - virtual void exitToOS() { shutdown_requested = true; } + virtual void exitToOS() + { + shutdown_requested = true; + } - virtual void disconnect() { disconnect_requested = true; } + virtual void disconnect() + { + disconnect_requested = true; + } - virtual void changePassword() { changepassword_requested = true; } + virtual void changePassword() + { + changepassword_requested = true; + } - virtual void changeVolume() { changevolume_requested = true; } + virtual void changeVolume() + { + changevolume_requested = true; + } - virtual void keyConfig() { keyconfig_requested = true; } + virtual void keyConfig() + { + keyconfig_requested = true; + } + + virtual void signalKeyConfigChange() + { + keyconfig_changed = true; + } - virtual void signalKeyConfigChange() { keyconfig_changed = true; } bool disconnect_requested = false; bool changepassword_requested = false; -- cgit v1.2.3