This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
greygraphics's profile picture

Titlebar for Computers

Started by greygraphics, 08 December 2016 - 07:59 AM
greygraphics #1
Posted 08 December 2016 - 08:59 AM
Hi everybody,

When I exprimented with "full-screen" programs and had to troubleshoot some bugs that did not appear on one computer but did on the other one, I was looking for a way of letting me know the computer label (because it is convenient) and display messages about the current program status without obstucting the screen I was using for the program.

Of course there are easy ways of avoiding that problem, but still, this got me thinking:

a title bar would be really useful right now!


My suggestion:

Add a dedicated titlebar to the normal and advanced computers. A second screen that is controlled just like the main screen is, but with another API.

How would you use this?

You would control the screen just like the main screen, but not with the term API. That way the main screen could receive updates like term.clear, term.setBackgroundColour, etc. without affecting the title bar and make it easy for a program to supply the user with information about the running program without taking up space on the main screen.

This is a concept of how it could look
[attachment=2703:big4.png]

This would make full-screen troubleshooting so much easier :)/>
Edited on 08 December 2016 - 08:02 AM
supernicejohn #2
Posted 08 December 2016 - 10:33 AM
Could be cool, but I think it would be easier to just make a new window object and lay that on top, toggling visibility with a key. I could see the usefulness if you printed local variables from the program to the 'titlebar' but you could also save that to a file to view later, minus the live-updating functionality. Maybe it would look good if it was a tiny display, with a fixed bg and text color.
We'll just have to wait and see I guess.
Bomb Bloke #3
Posted 08 December 2016 - 11:46 PM
Regarding "window objects", these are terminals within a terminal that you can redirect to and use as if they were a separate display. Multishell uses them to help manage its tabs for eg.

In short, if you want a program to have a separate area of the screen to output debug info to, then simply code it to define two windows within the main terminal, as switch between the two as need be. Frankly, though, I think you'd be much better off using file IO to write relevant data to disk, from where you can review it at your leisure.
Edited on 08 December 2016 - 10:50 PM
Lupus590 #4
Posted 09 December 2016 - 01:17 PM
or you could use multiple monitors, there is a monitor based keyboard somewhere on the forums which will reduce the need to open and close the computer screen