Class
TerminalSize
ConsoleMonster.Output
Reads the visible window size, rather than the scrollback buffer; safe to call every frame.
Inheritance
- object
- TerminalSize
Methods
public static bool TryGet(out int width, out int height) #Tries to read the visible size without throwing.
Parameters
- width int
- Columns, or zero when unavailable.
- height int
- Rows, or zero when unavailable.
Returns
bool Whether a positive size was read.public static bool TryGetWindow(out int left, out int top, out int width, out int height) #Reads the visible window's position in the screen buffer and its size. On Windows consoles the position changes when the user scrolls the window; elsewhere it is always (0, 0).
Parameters
- left int
- The window's left column in the buffer.
- top int
- The window's top row in the buffer.
- width int
- The window width in cells.
- height int
- The window height in cells.
Returns
bool True when the window could be read.