I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

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[edit]

See UTHUD properties.

Structs[edit]

DamageInfo[edit]

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[edit]

Static native functions[edit]

TranslateBindToFont[edit]

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[edit]

DrawBackground[edit]

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[edit]

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[edit]

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[edit]

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[edit]

static function string FormatTime (int Seconds)

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

GetFontSizeIndex[edit]

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[edit]

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[edit]

GrowHUD[edit]

exec function GrowHUD ()

Adds missing elements to HUD.

ReleaseShowScores[edit]

exec function ReleaseShowScores ()

Hides the scoreboard.

SetShowScores[edit]

exec function SetShowScores (bool bNewValue)

Overrides: HUD.SetShowScores

Shows or hides the scoreboard according to the parameter value.

ShowAllAI[edit]

exec function ShowAllAI ()

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

ShowQuickPickMenu[edit]

exec function ShowQuickPickMenu (bool bShow)

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

ShowSquadRoutes[edit]

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[edit]

exec function ShrinkHUD ()

Removes elements from HUD.

StartMusic[edit]

exec function StartMusic ()

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

ToggleHUD[edit]

exec function ToggleHUD ()

Overrides: HUD.ToggleHUD

Toggles the entire HUD on/off.

Native functions[edit]

DisplayWeaponBar[edit]

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[edit]

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


DrawGlowText[edit]

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

Draw a glowing string

LinkToHudScene[edit]

native function LinkToHudScene ()

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

Events[edit]

PostBeginPlay[edit]

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[edit]

event PostRender ()

Overrides: HUD.PostRender

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

Timer[edit]

simulated event Timer ()

Overrides: Actor.Timer

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

Other instance functions[edit]

See UTHUD instance functions.