Use the methods of this library for printing strings to the Cafu in-game console. More...
Public Member Functions | |
Print (string s) | |
Prints a message to the in-game console. More... | |
DevPrint (string s) | |
Prints a developer message to the in-game console. More... | |
Warning (string s) | |
Prints a warning to the in-game console. More... | |
DevWarning (string s) | |
Prints a developer warning to the in-game console. More... | |
table | GetDir (string dir, string mode="") |
Returns an array (a table) with the file and directory entries of the given directory. More... | |
Use the methods of this library for printing strings to the Cafu in-game console.
Note that you don't have to create instances of this class yourself. Instead this class is used like a (Lua) library: A global instance Console
is automatically available. See the function details below for examples on usage.
DevPrint | ( | string | s | ) |
Prints a developer message to the in-game console.
If the "developer"
console variable is set, this prints the string s
, prepended by "[Dev] "
, to the Cafu in-game console. If the "developer"
console variable is not set, nothing is printed.
s | The developer message to print to the console. |
DevWarning | ( | string | s | ) |
Prints a developer warning to the in-game console.
If the "developer"
console variable is set, this prints the string s
, prepended by "[Dev] Warning: "
, to the Cafu in-game console. If the "developer"
console variable is not set, nothing is printed.
s | The developer warning to print to the console. |
table GetDir | ( | string | dir, |
string | mode = "" |
||
) |
Returns an array (a table) with the file and directory entries of the given directory.
"f"
is passed as a second parameter, only entries of type file are returned,"d"
is passed as a second parameter, only entries of type directory are returned,dir | The name of the directory to get the entries for. |
mode | Whether only file entries ("f" ), only directory entries ("d" ), or all entries should be returned. See above for details. |
( | string | s | ) |
Prints a message to the in-game console.
s | The message to print to the console. |
Warning | ( | string | s | ) |
Prints a warning to the in-game console.
This is similar to Print(), except that the text "Warning: "
is automatically prepended to the output.
s | The warning to print to the console. |