|
|
|
@ -13,6 +13,7 @@
|
|
|
|
#include <input/inputManager.h>
|
|
|
|
#include <input/inputManager.h>
|
|
|
|
#include <cstring>
|
|
|
|
#include <cstring>
|
|
|
|
#include <sstream>
|
|
|
|
#include <sstream>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
namespace lunarium
|
|
|
|
namespace lunarium
|
|
|
|
{
|
|
|
|
{
|
|
|
|
namespace gui
|
|
|
|
namespace gui
|
|
|
|
@ -47,12 +48,20 @@ namespace lunarium
|
|
|
|
Console::Console(PanelType type, const char* name)
|
|
|
|
Console::Console(PanelType type, const char* name)
|
|
|
|
: Panel(type, name, gui::PanelDockZone::DDZ_NONE, false),
|
|
|
|
: Panel(type, name, gui::PanelDockZone::DDZ_NONE, false),
|
|
|
|
mbNewCommand(false), mRecalledCommand(-1), mIsFocused(false), mListener(nullptr),
|
|
|
|
mbNewCommand(false), mRecalledCommand(-1), mIsFocused(false), mListener(nullptr),
|
|
|
|
mbOglDebug(false), mbInfoVerbose(false)
|
|
|
|
mbOglDebug(false), mbInfoVerbose(false), mpListener(nullptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
memset(mBuffer, 0, LUA_CON_BUFFER_SIZE);
|
|
|
|
memset(mBuffer, 0, LUA_CON_BUFFER_SIZE);
|
|
|
|
Logger::GetInstance()->AddListener(new GuiListener(this));
|
|
|
|
mpListener = Logger::GetInstance()->AddListener(new GuiListener(this));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Console::~Console()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Logger::GetInstance()->RemoveListener(mpListener);
|
|
|
|
|
|
|
|
delete mpListener;
|
|
|
|
|
|
|
|
mpListener = nullptr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Console::IsFocused() const
|
|
|
|
bool Console::IsFocused() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return mIsFocused;
|
|
|
|
return mIsFocused;
|
|
|
|
|