close console when using the !load command
This commit is contained in:
parent
3a29fc0268
commit
5ef6bd8507
@ -22,12 +22,13 @@ ConsoleController::ConsoleController(ControllerCallback * callback, CommandInter
|
|||||||
|
|
||||||
void ConsoleController::EvaluateCommand(std::string command)
|
void ConsoleController::EvaluateCommand(std::string command)
|
||||||
{
|
{
|
||||||
|
if (command.substr(0, 5) == "!load ")
|
||||||
|
CloseConsole();
|
||||||
int returnCode = commandInterface->Command(command);
|
int returnCode = commandInterface->Command(command);
|
||||||
if(command.length())
|
if(command.length())
|
||||||
consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError()));
|
consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError()));
|
||||||
else
|
else
|
||||||
if(ui::Engine::Ref().GetWindow() == consoleView)
|
CloseConsole();
|
||||||
ui::Engine::Ref().CloseWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleController::CloseConsole()
|
void ConsoleController::CloseConsole()
|
||||||
|
Reference in New Issue
Block a user