Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:Console (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 03:21, 26 July 2008 by Wormbo (Talk | contribs) (1 revision)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT3 Object >> UIRoot >> Interaction >> Console
Package: 
Engine
Within class: 
GameViewportClient
Direct subclass:
UTConsole
This class in other games:
RTNP, U1, UT, UE2Runtime, U2XMP, U2, UT2003, UT2004, UDK

Console - A quick little command line console that accepts most commands. Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Constants

MaxHistory

Value: 16

  1. of command history to remember.

Properties

bCaptureKeyInput

Type: bool

Modifiers: transient

Indicates that InputChar events should be captured to prevent them from being passed on to other interactions. Reset when the another keydown event is received.

bCtrl

Type: bool

True while a control key is pressed.

bEnableUI

Type: bool

Modifiers: config


ConsoleBufferText

Type: UILabel


ConsoleKey

Type: name

Modifiers: globalconfig

The key which opens the console.

Default value: 'F10'

ConsoleTargetPlayer

Type: LocalPlayer

The player which the next console command should be executed in the context of. If NULL, execute in the viewport.

DefaultTexture_Black

Type: Texture2D


Default value: Texture2D'EngineResources.Black'

DefaultTexture_White

Type: Texture2D


Default value: Texture2D'EngineResources.White'

History

Type: string

Array size: 16 (MaxHistory)

Modifiers: config

tracks previously entered console commands

HistoryBot

Type: int

Modifiers: config

index into the History array for the earliest command that was entered

Default value: -1

HistoryCur

Type: int

Modifiers: config

the index of the current position in the History array

HistoryTop

Type: int

Modifiers: config

index into the History array for the latest command that was entered

LargeConsoleInput

Type: ConsoleEntry


LargeConsoleScene

Type: UIScene


MaxScrollbackSize

Type: int

Modifiers: globalconfig

Visible Console stuff

Default value: 1024

MiniConsoleInput

Type: ConsoleEntry


MiniConsoleScene

Type: UIScene


SBHead

Type: int

Where in the scrollback buffer are we

SBPos

Type: int

Where in the scrollback buffer are we

Scrollback

Type: array<string>

Holds the scrollback buffer

TypedStr

Type: string

The command the user is currently typing.

TypedStrPos

Type: int

Current position in TypedStr

TypeKey

Type: name

Modifiers: globalconfig

The key which opens the typing bar.

Default value: 'Tab'

Default values

Property Value
OnReceivedNativeInputChar InputChar
OnReceivedNativeInputKey InputKey

Functions

Events

OutputText

event OutputText (coerce string Text)

Prints a (potentially multi-line) string of text to the console. The text is split into separate lines and passed to OutputTextLine.

Parameters:

  • Text - Text to display on the console.

Other instance functions

AppendInputText

function AppendInputText (string Text)

appends the specified text to the string of typed text

ClearOutput

function ClearOutput ()

Clears the console output buffer.

ConsoleCommand

function ConsoleCommand (string Command)

Executes a console command.

Parameters:

  • Command - The command to execute.

FlushPlayerInput

function FlushPlayerInput ()

Clears out all pressed keys from the player's input object.

Initialized

function Initialized ()

Overrides: Interaction.Initialized

Called when the Console is added to the GameViewportClient's Interactions array.

InputChar

function bool InputChar (int ControllerId, string Unicode)

Process a character input event (typing) routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this character input event
  • Unicode - the character that was typed

Returns:

True to consume the character, false to pass it on.

InputKey

function bool InputKey (int ControllerId, name Key, Object.EInputEvent Event, float AmountDepressed, bool bGamepad)

Process an input key event routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this input key event
  • Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
  • EventType - the type of event which occured (pressed, released, etc.)
  • AmountDepressed - for analog keys, the depression percent.

Returns:

true to consume the key event, false to pass it on.

IsUIConsoleOpen

function bool IsUIConsoleOpen ()


IsUIMiniConsoleOpen

function bool IsUIMiniConsoleOpen ()


OutputTextLine

function OutputTextLine (coerce string Text)

Prints a single line of text to the console.

Parameters:

  • Text - A line of text to display on the console.

PostRender_Console

function PostRender_Console (Canvas Canvas)


ProcessControlKey

function bool ProcessControlKey (name Key, Object.EInputEvent Event)

looks for Control key presses and the copy/paste combination that apply to both the console bar and the full open console

PurgeCommandFromHistory

function PurgeCommandFromHistory (string Command)

Searches console command history and removes any entries matching the specified command.

Parameters:

  • Command - The command to search for and purge from the history.

SetCursorPos

function SetCursorPos (int Position)


SetInputText

function SetInputText (string Text)


StartTyping

function StartTyping (coerce string Text)

Opens the typing bar with text already entered.

Parameters:

  • Text - The text to enter in the typing bar.

States

Open

Open.BeginState

event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).

Open.EndState

event EndState (name NextStateName)

Overrides: Object.EndState (global)

Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.

Open.PostRender_Console

event PostRender_Console (Canvas Canvas)

Overrides: PostRender_Console (global)


Open.InputChar

function bool InputChar (int ControllerId, string Unicode)

Overrides: InputChar (global)

(Description copied from Console.InputChar)
Process a character input event (typing) routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this character input event
  • Unicode - the character that was typed

Returns:

True to consume the character, false to pass it on.

Open.InputKey

function bool InputKey (int ControllerId, name Key, Object.EInputEvent Event, float AmountDepressed, bool bGamepad)

Overrides: InputKey (global)

Process an input key event routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this input key event
  • Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
  • EventType - the type of event which occured (pressed, released, etc.)
  • AmountDepressed - for analog keys, the depression percent.

Returns:

true to consume the key event, false to pass it on.

Typing

This state is used when the typing bar is open.

Typing.BeginState

event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).

Typing.EndState

event EndState (name NextStateName)

Overrides: Object.EndState (global)

Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.

Typing.PostRender_Console

event PostRender_Console (Canvas Canvas)

Overrides: PostRender_Console (global)


Typing.InputChar

function bool InputChar (int ControllerId, string Unicode)

Overrides: InputChar (global)

Process a character input event (typing) routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this character input event
  • Unicode - the character that was typed

Returns:

True to consume the character, false to pass it on.

Typing.InputKey

function bool InputKey (int ControllerId, name Key, Object.EInputEvent Event, float AmountDepressed, bool bGamepad)

Overrides: InputKey (global)

Process an input key event routed through unrealscript from another object. This method is assigned as the value for the OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.

Parameters:

  • ControllerId - the controller that generated this input key event
  • Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
  • EventType - the type of event which occured (pressed, released, etc.)
  • AmountDepressed - for analog keys, the depression percent.

Returns:

true to consume the key event, false to pass it on.