My program doesn't have bugs. It just develops random features.

UE3:UTHUD (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> HUD >> GameHUD >> UTHUD
Package: 
UTGame
Direct subclasses:
UTTeamHUD, UTBetrayalHUD
This class in other games:
UDK

The HUD class for Deathmatch and the base for all UT3 gametype HUDs.

Properties

See UTHUD properties.

Structs

DamageInfo

Modifiers: native

Holds data for directional damage indicators.

float FadeTime 
Time for fade-out.
float FadeValue 
Current fade value.
MaterialInstanceConstant MatConstant 
The MIC for this indicator.

Functions

Static native functions

TranslateBindToFont

native static function TranslateBindToFont (string InBindStr, out Font DrawFont, out string OutBindStr)

Convert a string with potential escape sequenced data in it to a font and the string that should be displayed

Other static functions

DrawBackground

static simulated function DrawBackground (float X, float Y, float Width, float Height, Object.LinearColor DrawColor, Canvas DrawCanvas)

Draws the background of player, vehicle and objective beacons.

DrawBarGraph

static simulated function DrawBarGraph (float X, float Y, float Width, float MaxWidth, float Height, Canvas DrawCanvas, Object.Color BarColor, Object.Color BackColor)

Draws a horizontal bar graph, e.g. for player health.

DrawBeaconBackground

static simulated function DrawBeaconBackground (float X, float Y, float Width, float Height, Object.LinearColor DrawColor, Canvas DrawCanvas)

Draws the background of a player or vehicle beacon.

DrawHealth

static simulated function DrawHealth (float X, float Y, float Width, float MaxWidth, float Height, Canvas DrawCanvas, optional byte Alpha)

Wrapper function for DrawBarGraph() specifically for health-like graphs.

FormatTime

static function string FormatTime (int Seconds)

Converts the number of seconds into a time string of the form HH:MM:SS.

GetFontSizeIndex

static function Font GetFontSizeIndex (int FontSize)

Overrides: HUD.GetFontSizeIndex

Returns a font from the default HudFonts array. Valid font sizes range from 0 to 3, values outside the range are clamped to the nearest valid value.

GetTeamColor

static simulated function GetTeamColor (int TeamIndex, optional out Object.LinearColor ImageColor, optional out Object.Color TextColor)

Returns image color red for team 0, blue for team 1 and white for any other team index. Always returns "light gold" (a pale yellow) as the text color.

Exec functions

GrowHUD

exec function GrowHUD ()

Adds missing elements to HUD.

ReleaseShowScores

exec function ReleaseShowScores ()

Hides the scoreboard.

SetShowScores

exec function SetShowScores (bool bNewValue)

Overrides: HUD.SetShowScores

Shows or hides the scoreboard according to the parameter value.

ShowAllAI

exec function ShowAllAI ()

Toggles whether AI information should be drawn for each bot Pawn.

ShowQuickPickMenu

exec function ShowQuickPickMenu (bool bShow)

Shows or hides the Quick Pick Menu according to the parameter value.

ShowSquadRoutes

exec function ShowSquadRoutes ()

Renders all squad routes of the currently spectated bot as persistent lines in the level. Each route gets a random color.

ShrinkHUD

exec function ShrinkHUD ()

Removes elements from HUD.

StartMusic

exec function StartMusic ()

Creates a UTMusicManager for the player, unless there already is a music manager for that player.

ToggleHUD

exec function ToggleHUD ()

Overrides: HUD.ToggleHUD

Toggles the entire HUD on/off.

Native functions

DisplayWeaponBar

native function DisplayWeaponBar ()

Draws the weapon bar.

There doesn't seem to be any easy way to customize the behavior of this function. It's not declared as final, so creating a custom weapon bar in UT3 is possible by overriding it and completely reimplementing its functionality in UnrealScript.

DrawActorOverlays

native function DrawActorOverlays (Object.Vector Viewpoint, Object.Rotator ViewRotation)


DrawGlowText

native function DrawGlowText (string Text, float X, float Y, optional float MaxHeightInPixels, optional float PulseTime, optional bool bRightJustified)

Draw a glowing string

LinkToHudScene

native function LinkToHudScene ()

This function will attempt to auto-link up HudWidgets to their associated transient property here in the hud.

Events

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: HUD.PostBeginPlay

Create a list of actors needing PostRenderFor() calls. (That would be all Pawns that are neither UTPawns nor UTVehicles, all UTGameObjectives, all UTOnslaughtNodeTeleporters, all UTDeployableNodeLockers and all UTOnslaughtFlags.) Other actors are free to register themselves via the UTHUD.AddPostRenderedActor() function.

PostRender

event PostRender ()

Overrides: HUD.PostRender

Updates drawing-related HUD properties, then calls DrawHUD() unless HUD.bShowHUD is False.

Timer

simulated event Timer ()

Overrides: Actor.Timer

Sorts the list of PlayerReplicationInfos via GameReplicationInfo.SortPRIArray().

Other instance functions

See UTHUD instance functions.