Fixed bug: LogGUI was being initialized twice causing it to hear log messages twice.

Gui_Panel_Refactor
Joeyrp 4 years ago
parent f5aea4216f
commit 6a03409ae3

@ -207,12 +207,11 @@ namespace lunarium
mpInput->Initialize(mpWindow); mpInput->Initialize(mpWindow);
// GUI // GUI
mGUI.Initialize(mpWindow); result = mGUI.Initialize(mpWindow);
result = LogGui::GetInstance().Initialize();
if (Failed(result)) if (Failed(result))
{ {
Logger::Log(LogCategory::CORE, LogLevel::WARNING, Logger::Log(LogCategory::CORE, LogLevel::WARNING,
"Could not initialized the debug log window: %s", result.Description); "Could not initialized the main GUI system: %s", result.Description);
} }
// SCRIPTING // SCRIPTING
@ -307,7 +306,7 @@ namespace lunarium
std::string command; std::string command;
if (LuaConsole::GetInstance().GetNewCommand(command)) if (LuaConsole::GetInstance().GetNewCommand(command))
{ {
Logger::Log(LogCategory::CORE, LogLevel::INFO, "New LUA command: %s", command.c_str()); // Logger::Log(LogCategory::CORE, LogLevel::INFO, "New LUA command: %s", command.c_str());
OpRes result = ScriptManager::RunScript(command.c_str()); OpRes result = ScriptManager::RunScript(command.c_str());
// NOTE: Ignoring script result // NOTE: Ignoring script result
} }

Loading…
Cancel
Save