Class Console
- Namespace
- Elegy.ConsoleSystem.API
- Assembly
- Elegy.ConsoleSystem.dll
Elegy console interface.
public static class Console
- Inheritance
-
Console
- Inherited Members
Fields
Blue
All text after this is blue.
public const string Blue = "$b"
Field Value
Gray
All text after this is gray.
public const string Gray = "$G"
Field Value
Green
All text after this is green.
public const string Green = "$g"
Field Value
Orange
All text after this is orange.
public const string Orange = "$o"
Field Value
Pink
All text after this is pink.
public const string Pink = "$p"
Field Value
Red
All text after this is red.
public const string Red = "$r"
Field Value
White
All text after this is white.
public const string White = "$w"
Field Value
Yellow
All text after this is yellow.
public const string Yellow = "$y"
Field Value
Properties
Arguments
Commandline arguments passed to the launcher.
public static Dictionary<string, string> Arguments { get; }
Property Value
Developer
Controls the submission of developer messages.
public static bool Developer { get; set; }
Property Value
Verbose
Controls the submission of verbose messages.
public static bool Verbose { get; set; }
Property Value
Methods
AddFrontend(IConsoleFrontend)
Registers a IConsoleFrontend.
public static bool AddFrontend(IConsoleFrontend frontend)
Parameters
frontend
IConsoleFrontend
Returns
Error(string)
Prints an error message.
public static void Error(string message)
Parameters
message
string
Error(string, string)
Prints an error with a tag. E.g. '[ModelManager] Can't find asset!'
public static void Error(string tag, string message)
Parameters
Execute(string)
public static bool Execute(string command)
Parameters
command
string
Returns
Fatal(string)
Prints a fatal error message.
public static void Fatal(string message)
Parameters
message
string
Fatal(string, string)
Prints a fatal error with a tag. E.g. '[Engine] OS could not allocate memory'
public static void Fatal(string tag, string message)
Parameters
Init(in LaunchConfig)
public static bool Init(in LaunchConfig launchConfig)
Parameters
launchConfig
LaunchConfig
Returns
InitAssemblyConvars(Assembly)
public static void InitAssemblyConvars(Assembly assembly)
Parameters
assembly
Assembly
Log(string, ConsoleMessageType)
Logs a message into the console, with a newline at the end.
public static void Log(string message = "", ConsoleMessageType type = ConsoleMessageType.Info)
Parameters
message
stringtype
ConsoleMessageType
Log(string, string, ConsoleMessageType)
Prints a message with a tag. E.g. '[Game] Map loaded!'
public static void Log(string tag, string message, ConsoleMessageType type = ConsoleMessageType.Info)
Parameters
tag
stringmessage
stringtype
ConsoleMessageType
LogArray<T>(params T[])
Prints an array of values in a single line.
public static void LogArray<T>(params T[] values)
Parameters
values
T[]
Type Parameters
T
LogInline(string)
Logs a message into the console without a newline.
public static void LogInline(string message = "")
Parameters
message
string
Newline(ConsoleMessageType)
Inserts a newline into the console.
public static void Newline(ConsoleMessageType type = ConsoleMessageType.Info)
Parameters
type
ConsoleMessageType
RegisterCommand(ConsoleCommand)
public static bool RegisterCommand(ConsoleCommand command)
Parameters
command
ConsoleCommand
Returns
- bool
true
upon success,false
upon encountering a duplicate or other error.
RemoveFrontend(IConsoleFrontend)
Unregisters a IConsoleFrontend.
public static bool RemoveFrontend(IConsoleFrontend frontend)
Parameters
frontend
IConsoleFrontend
Returns
Shutdown()
public static void Shutdown()
Success(string)
Prints a success message.
public static void Success(string message)
Parameters
message
string
Success(string, string)
Prints a success message with a tag. E.g. '[Game] Map loaded!'
public static void Success(string tag, string message)
Parameters
UnregisterCommand(ConsoleCommand)
public static bool UnregisterCommand(ConsoleCommand command)
Parameters
command
ConsoleCommand
Returns
Update(float)
public static void Update(float delta)
Parameters
delta
float
Warning(string)
Prints a warning message.
public static void Warning(string message)
Parameters
message
string
Warning(string, string)
Prints a warning with a tag. E.g. '[ModelManager] Model has too many vertices!'
public static void Warning(string tag, string message)