Bomb Bloke, on 11 February 2014 - 08:12 PM, said:
There are two ways to go about this. One is to have your API ignore any attempts by the running script to write stuff to the first line of the screen. This is fairly simple, but has a big downside in that you simply won't see the first line such scripts attempt to write - it'll be cropped out of view.
The other is to have your API capture ANY writes by the running script, and move them down one line. The upside is that the first line no longer gets cropped out of view - it's now just a line lower. The downside is that you've gotta rewrite most of the term API to pull it off. Optionally, you'd also report a smaller screen size to the scripts you run - this will allow those scripts which feel they "need" the whole display to throw up appropriate errors.
He's wondering which of these approaches you intend to take with your API.
Either way, you'll need to capture mouse input as well... The first method requires you to prevent the running script from "seeing" clicks in the top row. The second method requires you to report all clicks (except those to the top row) as being a line lower then they were actually located at. Either way you need to handle clicks to the menu bar itself.
While you could just rig co-routines to re-draw the menu bar whenever there's a chance, you never know how often you'll get those chances, let alone whether or not it needs to be redrawn. Expect a lot of flickering and an overall performance hit if you take that approach.
Yes, I need to move them down one line, not crop them. I couldn't figure out how to do it. All the text and stuff was messed up... so I was wondering if someone already made a API for this.
Edited by nutcase84, 12 February 2014 - 08:19 AM.