Fix unit test if there isn't a localhost address (for example FreeBSD jails), second...
[oweals/minetest.git] / src / mainmenumanager.h
index 56ba4012908ef909f226ed82104ae6989ef8399a..b14ca56e51c84f912d33a82603a2f000c375c8ae 100644 (file)
@@ -35,6 +35,8 @@ public:
        virtual void disconnect() = 0;
        virtual void changePassword() = 0;
        virtual void changeVolume() = 0;
+
+       virtual void signalKeyConfigChange() = 0;
 };
 
 extern gui::IGUIEnvironment* guienv;
@@ -54,7 +56,7 @@ public:
                        assert(*i != menu);
                }
 
-               if(m_stack.size() != 0)
+               if(!m_stack.empty())
                        m_stack.back()->setVisible(false);
                m_stack.push_back(menu);
        }
@@ -82,14 +84,14 @@ public:
                assert(*i == menu);
                m_stack.erase(i);*/
                
-               if(m_stack.size() != 0)
+               if(!m_stack.empty())
                        m_stack.back()->setVisible(true);
        }
 
        // Returns true to prevent further processing
        virtual bool preprocessEvent(const SEvent& event)
        {
-               if(m_stack.size() != 0)
+               if(!m_stack.empty())
                        return m_stack.back()->preprocessEvent(event);
                else
                        return false;
@@ -127,6 +129,7 @@ public:
                changevolume_requested(false),
                keyconfig_requested(false),
                shutdown_requested(false),
+               keyconfig_changed(false),
                device(a_device)
        {
        }
@@ -159,12 +162,20 @@ public:
                keyconfig_requested = true;
        }
 
+       virtual void signalKeyConfigChange()
+       {
+               keyconfig_changed = true;
+       }
+
        
        bool disconnect_requested;
        bool changepassword_requested;
        bool changevolume_requested;
        bool keyconfig_requested;
        bool shutdown_requested;
+
+       bool keyconfig_changed;
+
        IrrlichtDevice *device;
 };