UE3:HUD (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search
UT3 Object >> Actor >> HUD

Contents

Package: 
Engine

HUD: Superclass of the heads-up display.

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties

Property group 'HUD'

bShowBadConnectionAlert

Type: bool

Display indication of bad connection

ConsoleMessagePosX

Type: float


ConsoleMessagePosY

Type: float

DP_LowerLeft

Default value: 0.8

LocalMessages

Type: HudLocalizedMessage

Array size: 8

Modifiers: transient


Internal variables

bMessageBeep

Type: bool

Modifiers: globalconfig

If true, any console messages will make a beep

Default value: True

bShowDebugInfo

Type: bool

if true, show properties of current ViewTarget

bShowHUD

Type: bool

Modifiers: config

Is the hud visible

Default value: True

bShowScores

Type: bool

Is the Scoreboard visible

Canvas

Type: Canvas

Canvas to Draw HUD on. NOTE: a new Canvas is given every frame, only draw on it from the HUD::PostRender() event

CenterX

Type: float

Modifiers: transient

Center of Viewport

CenterY

Type: float

Modifiers: transient

Center of Viewport

ConsoleColor

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 253
G 216
R 153

ConsoleFontSize

Type: int

Modifiers: globalconfig


Default value: 5

ConsoleMessageCount

Type: int

Modifiers: globalconfig


Default value: 4

ConsoleMessages

Type: array<ConsoleMessage>


DebugDisplay

Type: array<name>

Modifiers: globalconfig


Default value: 'AI'

GreenColor

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 0
G 255
R 0

HudCanvasScale

Type: float

Modifiers: globalconfig


Default value: 0.95

HudOwner

Type: HUD

Used for sub-huds like the scoreboard

LastHUDRenderTime

Type: float

Modifiers: transient

Used to create DeltaTime

LostFocusPaused

Type: bool

Modifiers: transient

Tells whether the game was paused due to lost focus

MaxHUDAreaMessageCount

Type: int


Default value: 3

MessageFontOffset

Type: int

Modifiers: globalconfig


MOTDColor

Type: Object.Color


Default value:

Member Value
A 255
B 255
G 255
R 255

PlayerOwner

Type: PlayerController

always the actual owner

ProgressFadeTime

Type: float


Default value: 1.0

RatioX

Type: float

Modifiers: transient

Ratio of viewport compared to native resolution 1024x768

RatioY

Type: float

Modifiers: transient

Ratio of viewport compared to native resolution 1024x768

RedColor

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 0
G 0
R 255

RenderDelta

Type: float

Modifiers: transient

Time since last render

Scoreboard

Type: ScoreBoard


SizeX

Type: float

Modifiers: transient

Size of ViewPort in pixels

SizeY

Type: float

Modifiers: transient

Size of ViewPort in pixels

ViewedInfo

Type: PlayerReplicationInfo

The PRI of the current view target

WhiteColor

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 255
G 255
R 255

Default values

Property Value
bHidden True
CollisionType COLLIDE_CustomDefault
TickGroup TG_DuringAsyncWork

Structs

ConsoleMessage

Modifiers: native

string Text 
Object.Color TextColor 
float MessageLife 
PlayerReplicationInfo PRI 

HudLocalizedMessage

Modifiers: native

class<LocalMessage> Message 
string StringMessage 
int Switch 
float EndOfLife 
float Lifetime 
float PosY 
Object.Color DrawColor 
int FontSize 
Font StringFont 
float DX 
float DY 
bool Drawn 
int Count 
Object OptionalObject 

Functions

Static functions

GetFontSizeIndex

static function Font GetFontSizeIndex (int FontSize)


GetRYGColorRamp

static function Object.Color GetRYGColorRamp (float Pct)


Exec functions

FXPlay

exec function FXPlay (class<PawnaClass, string FXAnimPath)

Finds the nearest pawn of the given class (excluding the owner's pawn) and plays the specified FaceFX animation.

FXStop

exec function FXStop (class<PawnaClass)

Finds the nearest pawn of the given class (excluding the owner's pawn) and stops any currently playing FaceFX animation.

SetShowScores

exec function SetShowScores (bool bNewValue)

sets bShowScores to a specific value (not toggle)

ShowDebug

exec function ShowDebug (optional name DebugType)


ShowHUD

exec function ShowHUD ()


ShowScores

exec function ShowScores ()


ToggleHUD

exec function ToggleHUD ()


Native functions

Draw2DLine

native final function Draw2DLine (int X1, int Y1, int X2, int Y2, Object.Color LineColor)


Draw3DLine

native final function Draw3DLine (Object.Vector Start, Object.Vector End, Object.Color LineColor)


Events

Destroyed

event Destroyed ()

Overrides: Actor.Destroyed


OnLostFocusPause

event OnLostFocusPause (bool Enable)

Pauses or unpauses the game due to main window's focus being lost.

Parameters:

  • Enable - tells whether to enable or disable the pause state

PostBeginPlay

event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


PostRender

event PostRender ()

PostRender is the main draw loop.

Other instance functions

AddConsoleMessage

function AddConsoleMessage (string M, class<LocalMessageInMessageClass, PlayerReplicationInfo PRI, optional float LifeTime)

Add a new console message to display.

AddLocalizedMessage

function AddLocalizedMessage (int Index, class<LocalMessageInMessageClass, string CriticalString, int Switch, float Position, float LifeTime, int FontSize, Object.Color DrawColor, optional int MessageCount, optional Object OptionalObject)

Add the actual message to the array. Made easier to tweak in a subclass

Parameters:

  • Index - The index in to the LocalMessages array to place it.
  • InMessageClass - Class of the message
  • CriticialString - String of the message
  • Switch - The message switch
  • Position - Where on the screen is the message
  • LifeTime - How long does this message live
  • FontSize - How big is the message
  • DrawColor - The Color of the message

ClearMessage

function ClearMessage (out HudLocalizedMessage M)


DisplayBadConnectionAlert

function DisplayBadConnectionAlert ()


DisplayConsoleMessages

function DisplayConsoleMessages ()

Display current messages

DisplayLocalMessages

function DisplayLocalMessages ()


DisplayProgressMessage

function DisplayProgressMessage ()

display progress messages in center of screen

DrawDemoHUD

function DrawDemoHUD ()

Called instead of DrawHUD() if bShowHUD==false

DrawEngineHUD

function DrawEngineHUD ()

Special HUD for Engine demo

DrawHUD

function DrawHUD ()

The Main Draw loop for the hud. Gets called before any messaging. Should be subclassed

DrawMessage

function DrawMessage (int i, float PosY, out float DX, out float DY)


DrawMessageText

function DrawMessageText (HudLocalizedMessage LocalMessage, float ScreenX, float ScreenY)


DrawRoute

function DrawRoute (Pawn Target)


GetScreenCoords

function GetScreenCoords (float PosY, out float ScreenX, out float ScreenY, out HudLocalizedMessage InMessage)


LocalizedMessage

function LocalizedMessage (class<LocalMessageInMessageClass, PlayerReplicationInfo RelatedPRI_1, string CriticalString, int Switch, float Position, float LifeTime, int FontSize, Object.Color DrawColor, optional Object OptionalObject)


Message

function Message (PlayerReplicationInfo PRI, coerce string Msg, name MsgType, optional float LifeTime)


PlayerOwnerDied

function PlayerOwnerDied ()

Called when the player owner has died.

PreCalcValues

function PreCalcValues ()

Pre-Calculate most common values, to avoid doing 1200 times the same operations

ShouldDisplayDebug

function bool ShouldDisplayDebug (name DebugType)


SpawnScoreBoard

function SpawnScoreBoard (class<ScoreBoardScoringType)