GRID CARTOGRAPHER 4
Shortcuts

ANSI Compatibility

2019-04-12

Grid Cartographer is supplied with a library of additional functions to perform common tasks. These are available to all Squirrel scripts by adding <load> entries into the hook definition, or by using the include function. Note: hook references should appear before the main script so that the function names, etc. are registered correctly prior to use.

Requirements

Header | stdio/ansi.nut

Functions

ansi_init

ansi_init(): void

Initialize the ANSI support library. The current console attribute setting will be stored and used when a request to restore to 'normal' output is made, thus preserving expected text and background color settings, etc.

ansi_print

ansi_print( text:string ): void

Prints the given text string, decoding ANSI escape sequences as they are encountered. A new line is not automatically output at the end of the string.