Skip to main content

The "sys_cmd_draw" Function

Syntax#

sys_cmd_draw(x, y, width, height, font, col1, col2);
ArgumentTypeDescription
xrealThe horizontal position to draw the console
yrealThe vertical position to draw the console
widthrealsets the console width in pixels
heightrealsets the console height in pixels
fontfontsets the console output font
col1colorsets the console background color
col2colorsets the console foreground color

Description#

Draws the command console with the specified position, dimensions, and style when visible. The console is positioned from the top-left corner.

Note that any input longer than the width of the console will be scrolled to the position of the cursor, not line-wrapped.

As this script is run automatically by other engine functions, it is almost never necessary to run sys_cmd_draw manually.