Jump to content

UNIGINE console clear command


photo

Recommended Posts

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.

Link to comment
  • 1 month later...

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.

Link to comment
×
×
  • Create New...