I've been testing it (and it works just fine), but I've hit some slight snags, so just a few questions:
1) How can I detect the size of the console?
2) And related to the one above - if the console is resized, is there some way of detecting it?
3) Is it possible for me to access the current text on the screen (like using the Point() function returns the colour of a point in an image, I want to return the character on the screen/terminal)
Using the new graphical console
Re: Using the new graphical console
Answers so far:
1) With magic. Linux only as far as I'm aware:
2) You can't - but you can keep checking the size of the console periodically
1) With magic. Linux only as far as I'm aware:
Code: Select all
Structure TerminalWindowSize
row.w
col.w
xPixel.w
yPixel.w
EndStructure
ws.TerminalWindowSize
#TIOCGWINSZ = $5413
OpenConsole()
EnableGraphicalConsole(1)
PrintN("Press enter to show the current console size")
Input()
ioctl_(0, #TIOCGWINSZ, @ws)
PrintN("> " + Str(ws\col) + " x " + Str(ws\row))
PrintN("")
PrintN("Press enter to quit")
Input()