Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear console programmatically #133

Open
pmgl opened this issue May 16, 2022 · 4 comments
Open

Clear console programmatically #133

pmgl opened this issue May 16, 2022 · 4 comments

Comments

@pmgl
Copy link
Owner

pmgl commented May 16, 2022

Suggested solution:

print("/d")
@HomineLudens
Copy link
Contributor

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.

@TinkerStudio
Copy link

TinkerStudio commented May 17, 2022

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.

@JmeJuniper
Copy link

JmeJuniper commented Jun 12, 2022

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?

@saklis
Copy link

saklis commented Nov 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants