Structs:Console
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
The Console struct holds functions that mostly deal with printing text strings on the screen and to the console.
Methods
All of these methods are static and can be called by prefixing them with Console.
:
- void HideConsole()
- Hides the console.
- vararg void Printf(string fmt, ...)
- Prints text on the screen and in the console, similarly to A_Log. Has string formatting built in, like String.Format, so values can be passed after the first argument.
- vararg void PrintfEx(int printlevel, string fmt, ...)
- Extended version of
Printf
that accepts printlevel as the first argument.
- void MidPrint(Font fontname, string textlabel, bool bold = false)
- Prints text to the console and in the middle of the screen, as opposed to the top left corner. Allows specifying a font, and optionally process the message as bold. In contrast to
Printf
andPrintfEx
, does not have string formatting built in, soString.Format
is required to print a formatted string.
Printlevel
Possible printlevel values are defined in the EPrintLevel
enum:
enum EPrintLevel
{
PRINT_LOW, // pickup messages
PRINT_MEDIUM, // death messages
PRINT_HIGH, // critical messages
PRINT_CHAT, // chat messages
PRINT_TEAMCHAT, // chat messages from a teammate
PRINT_LOG, // only to logfile
PRINT_BOLD = 200, // What Printf_Bold used
PRINT_TYPES = 1023, // Bitmask.
PRINT_NONOTIFY = 1024, // Flag - do not add to notify buffer
PRINT_NOLOG = 2048, // Flag - do not print to log file
};