C# Класс DeveloperConsole.DeveloperConsole

The console model
Наследование: Script, IDeveloperConsole
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Debug bool
Input string

Открытые методы

Метод Описание
ClearLines ( ) : void

Clears all the lines in the console

DeveloperConsole ( ) : System

Creates the console

PrintCommandInfo ( DeveloperConsole.CommandDispatcher cmd ) : void

Prints the man page for a specified command to the console

PrintCommandInfo ( string cmd ) : void

Prints the man page for a specified command to the console

PrintDebug ( string s ) : void

Prints a debug line to the console if Debug is true

PrintError ( string s ) : void

Prints an error line to the console

PrintLine ( string s ) : void

Prints a line to the console with the default text color

PrintLine ( string s, Color c ) : void

Prints a line to the console

PrintWarning ( string s ) : void

Prints a warning line to the console

RemoveLastLine ( ) : void

Removes the last line of the console

ShowConsole ( bool show ) : void

Show the console

Приватные методы

Метод Описание
BackSpace ( ) : void

Delete 1 character before the cursor

CursorLeft ( ) : void

Move the cursor to the left 1 character

CursorRight ( ) : void

Move the cursor to the right 1 character

Del ( ) : void

Delete 1 character after the cursor

DrawConsole ( ) : void

Draws the console on screen

GetLargeStringUIText ( string s, Point p, float sz, Color c, GTA.Font f, bool cnt ) : List

Breaks a large string up into multiple UIText objects

InjectToGAC ( ) : void

Inject our assembly to the Global Assembly Cache so all scripts have access to it

LastInput ( ) : void

Set the input line to the last item in input history

NextInput ( ) : void

Set the input line to the next item in input history If no next line in input history, clears input

OnKeyDown ( object sender, KeyEventArgs e ) : void

Handles key presses

OnKeyUp ( object sender, KeyEventArgs e ) : void

Handles key releases

OnTick ( object sender, EventArgs e ) : void

This method is called every game tick

RegisterConsoleScript ( Script s, OnConsoleAttached c ) : void

Register a script with the console

RunCommand ( ) : void

Run the command string from the input line

ScrollDown ( ) : void

Scroll the console down

ScrollUp ( ) : void

Scroll the console up

SetConsoleControls ( ) : void

Disables all controls not enabled while using the console

SetKeyDown ( Keys k ) : bool
Split ( string str, int chunkSize ) : List

Splits a string up into chunks of a specified size

Описание методов

ClearLines() публичный Метод

Clears all the lines in the console
public ClearLines ( ) : void
Результат void

DeveloperConsole() публичный Метод

Creates the console
public DeveloperConsole ( ) : System
Результат System

PrintCommandInfo() публичный Метод

Prints the man page for a specified command to the console
public PrintCommandInfo ( DeveloperConsole.CommandDispatcher cmd ) : void
cmd DeveloperConsole.CommandDispatcher The command to print info for
Результат void

PrintCommandInfo() публичный Метод

Prints the man page for a specified command to the console
public PrintCommandInfo ( string cmd ) : void
cmd string The name of the command to print info for
Результат void

PrintDebug() публичный Метод

Prints a debug line to the console if Debug is true
public PrintDebug ( string s ) : void
s string The message
Результат void

PrintError() публичный Метод

Prints an error line to the console
public PrintError ( string s ) : void
s string The message
Результат void

PrintLine() публичный Метод

Prints a line to the console with the default text color
public PrintLine ( string s ) : void
s string The message
Результат void

PrintLine() публичный Метод

Prints a line to the console
public PrintLine ( string s, Color c ) : void
s string The message
c Color The color of the line
Результат void

PrintWarning() публичный Метод

Prints a warning line to the console
public PrintWarning ( string s ) : void
s string The message
Результат void

RemoveLastLine() публичный Метод

Removes the last line of the console
public RemoveLastLine ( ) : void
Результат void

ShowConsole() публичный Метод

Show the console
public ShowConsole ( bool show ) : void
show bool Whether or not the console should be shown
Результат void

Описание свойств

Debug публичное свойство

Whether or not console debug is enabled
public bool Debug
Результат bool

Input публичное свойство

The consoles input text
public string Input
Результат string