/****************************************************************************** * File - luaConsole.h * Author - Joey Pollack * Date - 2021/09/17 (y/m/d) * Mod Date - 2021/09/17 (y/m/d) * Description - GUI window for the LUA console ******************************************************************************/ #ifndef LUA_CONSOLE_H_ #define LUA_CONSOLE_H_ #include #include #include namespace lunarium { const int LUA_CON_BUFFER_SIZE = 64; class LuaConsole { public: static LuaConsole& GetInstance(); static void FreeInstance(); OpRes Initialize(); void Show(); void SetShow(bool show); bool IsShown() const; const std::vector* GetCommandHistory() const; std::string GetLastCommand(); bool GetNewCommand(std::string& command); // returns true if there is a new and false if not private: static LuaConsole* mpInstance; bool mbShow; char mBuffer[LUA_CON_BUFFER_SIZE]; std::vector mCommandHistory; bool mbNewCommand; private: LuaConsole(); LuaConsole(const LuaConsole&) = delete; const LuaConsole& operator=(const LuaConsole&) = delete; }; } #endif // LUA_CONSOLE_H_