dreamworkAPI
Ctrl K
GitHub
libraryDocs / console

console

librarysharedmenusource

The source engine console library.

Classes & types

Fields

NameTypeDescription
visiblebooleantrue if the console is visible, false otherwise.
showmenuShows the console.

Events

#console.Visibility

sharedmenuEventsource

An event that is called with the new visibility when the console is shown or hidden.

Functions

console.clearClears the console output.
console.flagReturns the integer flag value for the given flag name.
console.flagsBuilds an integer flag value from the given flag map.
console.hideHides the console.
console.toggleToggles the console.
console.writeWrites a message to the console.
console.writeLineWrites a message to the console with new line after the text.

#console.clear

sharedmenusource
function console.clear()

Clears the console output.

#console.flag

sharedmenunodiscardsource
function console.flag(flag_name: console.Flags): integer

Returns the integer flag value for the given flag name.

Parameters
NameTypeDescription
flag_nameconsole.Flags
Returns
TypeNameDescription
integerint32_flag

#console.flags

sharedmenunodiscardsource
function console.flags(int32_flags: integer, flag_map: table<console.Flags, boolean>): integer

Builds an integer flag value from the given flag map.

Parameters
NameTypeDescription
int32_flagsinteger
flag_maptable<console.Flags, boolean>
Returns
TypeNameDescription
integerflag

#console.hide

menusource
function console.hide()

Hides the console.

#console.toggle

menusource
function console.toggle()

Toggles the console.

#console.write

sharedmenusource
function console.write(...: string | Color)

Writes a message to the console.

Parameters
NameTypeDescription
...string | ColorThe message to write to the console.

#console.writeLine

sharedmenusource
function console.writeLine(...: string | Color)

Writes a message to the console with new line after the text.

Parameters
NameTypeDescription
...string | ColorThe message to write to the console.
Generated from the dreamwork meta branch.