class Console
package digigun.sys.console
Class for low-level terminal and console control.
Static methods
staticgetTerminalSize():{width:Int, height:Int}
Retrieves the current terminal window dimensions.
Returns:
An object containing width and height, or null if not available.
staticreadBlock(x:Int, y:Int, width:Int, height:Int):{chars:Array<Int>, attrs:Array<Int>}
Reads a block of characters and color attributes from the console (Windows only).
Parameters:
x | Screen X coordinate. |
|---|---|
y | Screen Y coordinate. |
width | Width of the block. |
height | Height of the block. |
Returns:
Object containing the read chars and attrs arrays.
staticsetRawMode(enabled:Bool):Bool
Toggles "Raw Mode" for the terminal.
Parameters:
enabled | If true, enables raw mode. If false, restores previous mode. |
|---|
Returns:
True if successful.
staticwriteBlock(x:Int, y:Int, width:Int, height:Int, chars:Array<Int>, attrs:Array<Int>):Void
Writes a block of characters and color attributes to the console.
Parameters:
x | Screen X coordinate. |
|---|---|
y | Screen Y coordinate. |
width | Width of the block. |
height | Height of the block. |
chars | Array of ASCII character codes. |
attrs | Array of platform-specific color attributes. |