mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 11:19:51 +02:00
close console when using the !load command
This commit is contained in:
@@ -22,12 +22,13 @@ ConsoleController::ConsoleController(ControllerCallback * callback, CommandInter
|
||||
|
||||
void ConsoleController::EvaluateCommand(std::string command)
|
||||
{
|
||||
if (command.substr(0, 5) == "!load ")
|
||||
CloseConsole();
|
||||
int returnCode = commandInterface->Command(command);
|
||||
if(command.length())
|
||||
consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError()));
|
||||
else
|
||||
if(ui::Engine::Ref().GetWindow() == consoleView)
|
||||
ui::Engine::Ref().CloseWindow();
|
||||
CloseConsole();
|
||||
}
|
||||
|
||||
void ConsoleController::CloseConsole()
|
||||
|
Reference in New Issue
Block a user