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

string

Gray

All text after this is gray.

public const string Gray = "$G"

Field Value

string

Green

All text after this is green.

public const string Green = "$g"

Field Value

string

Orange

All text after this is orange.

public const string Orange = "$o"

Field Value

string

Pink

All text after this is pink.

public const string Pink = "$p"

Field Value

string

Red

All text after this is red.

public const string Red = "$r"

Field Value

string

White

All text after this is white.

public const string White = "$w"

Field Value

string

Yellow

All text after this is yellow.

public const string Yellow = "$y"

Field Value

string

Properties

Arguments

Commandline arguments passed to the launcher.

public static Dictionary<string, string> Arguments { get; }

Property Value

Dictionary<string, string>

Developer

Controls the submission of developer messages.

public static bool Developer { get; set; }

Property Value

bool

Verbose

Controls the submission of verbose messages.

public static bool Verbose { get; set; }

Property Value

bool

Methods

AddFrontend(IConsoleFrontend)

Registers a IConsoleFrontend.

public static bool AddFrontend(IConsoleFrontend frontend)

Parameters

frontend IConsoleFrontend

Returns

bool

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

tag string
message string

Execute(string)

public static bool Execute(string command)

Parameters

command string

Returns

bool

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

tag string
message string

Init(in LaunchConfig)

public static bool Init(in LaunchConfig launchConfig)

Parameters

launchConfig LaunchConfig

Returns

bool

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 string
type 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 string
message string
type 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

bool

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

tag string
message string

UnregisterCommand(ConsoleCommand)

public static bool UnregisterCommand(ConsoleCommand command)

Parameters

command ConsoleCommand

Returns

bool

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)

Parameters

tag string
message string