Fix a memleak pointed by @Zeno- in MeshUpdateQueue
[oweals/minetest.git] / src / guiChatConsole.h
index 7b9fc67328bec82f46b4a92511cc60ac20b9eb75..0332678c759667cd9d66ddcac93b22d8094fd4b9 100644 (file)
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define GUICHATCONSOLE_HEADER
 
 #include "irrlichttypes_extrabloated.h"
+#include "modalMenu.h"
 #include "chat.h"
 #include "config.h"
 
@@ -33,13 +34,14 @@ public:
                        gui::IGUIElement* parent,
                        s32 id,
                        ChatBackend* backend,
-                       Client* client);
+                       Client* client,
+                       IMenuManager* menumgr);
        virtual ~GUIChatConsole();
 
        // Open the console (height = desired fraction of screen size)
        // This doesn't open immediately but initiates an animation.
        // You should call isOpenInhibited() before this.
-       void openConsole(f32 height);
+       void openConsole(f32 scale);
 
        bool isOpen() const;
 
@@ -75,6 +77,8 @@ public:
 
        virtual bool OnEvent(const SEvent& event);
 
+       virtual void setVisible(bool visible);
+
 private:
        void reformatConsole();
        void recalculateConsolePosition();
@@ -86,17 +90,15 @@ private:
        void drawPrompt();
 
 private:
-       // pointer to the chat backend
        ChatBackend* m_chat_backend;
-
-       // pointer to the client
        Client* m_client;
+       IMenuManager* m_menumgr;
 
        // current screen size
        v2u32 m_screensize;
 
        // used to compute how much time passed since last animate()
-       u32 m_animate_time_old;
+       u64 m_animate_time_old;
 
        // should the console be opened or closed?
        bool m_open;