microstudio icon indicating copy to clipboard operation
microstudio copied to clipboard

Clear console programmatically

Open pmgl opened this issue 2 years ago • 4 comments

Suggested solution:

print("/d")

pmgl avatar May 16 '22 07:05 pmgl

I propose to have a console object that could in future expands to embedd other commands: clear setColor input

It may looks not so elegant to leave an alias print for console.print but it will not break backwards compatibility and will be an easy entry point for newcomers.

HomineLudens avatar May 16 '22 12:05 HomineLudens

I like the idea of having more options to control the console output. I use it quite often for debugging. Regarding the console.xxx( ), I like that too. But I can already smell that someone wants to make a text only adventure and to make things easier will request a console.draw(x,y,w,h) command :)
Width and height in characters?

As in, draw the console content to the game screen.

TinkerStudio avatar May 17 '22 19:05 TinkerStudio

Perhaps there could also be a way to read the console text? Either as a multi-line string or as a list. Maybe you could have a function console.getInputs() and console.getOutputs(). getInputs would return all the things inputted into the console, and getOutputs would return the results. Maybe there could also be console.show() and console.hide() (which would both show the console to the user, next to or below the project), in addition to console.acceptInputs(inputs), console.denyInput(inputs), console.denyAll(), and console.acceptAll(), which would pick which commands/variables the user can enter (inputs, in both functions, is a list filled with strings listing the commands). Naturally, all inputs would be disabled by default. Maybe even system.project.show() and system.project.hide() could be a thing?

JmeJuniper avatar Jun 12 '22 01:06 JmeJuniper

It could be enough to implement some simple meta formatting inside print(). Maybe if string starts with "ERROR", then it should display in red, and if with "WARNING", then in yellow.

saklis avatar Nov 06 '23 10:11 saklis