Jump to content

UNIGINE console clear command


photo

Recommended Posts

Posted

Proposal

 

addition of a clear command for clearing console output history

 

Reason

 

When using commands like system_analyse etc. the console history growth quite quickly. Clearing the history between calls would be helpfull.

  • 1 month later...
Posted

We have implemented clear command as additional build-in console command like ls, toggle, bind/unbind and exposed it to UNIGINE script as engine.console.clear().

 

Also fixed uninitalized empty line color_id value in WidgetConsole::WidgetConsole(), which might cause crashes in void WidgetConsole::render() due to invalid color array access

 

void WidgetConsole::render() {
.....
render_text(0,getFontSize() * i,colors[lines[index].color_id],lines[index].line.get(),0,0);
.....
}

 

Updated source files console.h/.cpp and GuiInterpreter.cpp send to Alexander, maybe he is willing to include it into UNIGINE distribution.

Posted

Thanks. Console clear command is implemented.

But instead of engine.console.clear() function use engine.console.run("clear") function.

Posted

But instead of engine.console.clear() function use engine.console.run("clear") function.

 

yep, this is more consistent, thanks !

×
×
  • Create New...