Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/GameFramework/HUD.h |
Include |
#include "GameFramework/HUD.h" |
class AHUD : public AActor
Base class of the heads-up display. This has a canvas and a debug canvas on which primitives can be drawn. It also contains a list of simple hit boxes that can be used for simple item click detection. A method of rendering debug text is also included. Provides some simple methods for rendering text, textures, rectangles and materials which can also be accessed from blueprints.
Name | Description | ||
---|---|---|---|
|
uint8: 1 |
bEnableDebugTextShadow |
Put shadow on debug strings |
|
uint8: 1 |
bLostFocusPaused |
Tells whether the game was paused due to lost focus |
|
uint8: 1 |
bShowDebugInfo |
If true, current ViewTarget shows debug information using its DisplayDebug(). |
|
uint8: 1 |
bShowHitBoxDebugInfo |
If true, show hitbox debugging info. |
|
uint8: 1 |
bShowHUD |
Whether or not the HUD should be drawn. |
|
uint8: 1 |
bShowOverlays |
If true, render actor overlays. |
|
UCanvas * |
Canvas |
Canvas to Draw HUD on. |
|
CurrentTargetIndex |
Current target in our considered Targets list for 'showdebug' |
|
|
UCanvas * |
DebugCanvas |
'Foreground' debug canvas, will draw in front of SlateUI. |
|
DebugDisplay |
Array of names specifying what debug info to display for viewtarget actor. |
|
|
TArray< struct ... |
DebugTextList |
|
|
HitBoxesOver |
Set of hitbox (by name) that are currently moused over or have a touch contacting them |
|
|
HitBoxHits |
Array of hitboxes that have been hit for this frame. |
|
|
HitBoxMap |
Array of hitboxes for this frame. |
|
|
float |
LastHUDRenderTime |
Used to calculate delta time between HUD rendering. |
|
PlayerOwner |
PlayerController which owns this HUD. |
|
|
PostRenderedActors |
Holds a list of Actors that need PostRender() calls. |
|
|
float |
RenderDelta |
Time since last HUD render. |
|
AActor * |
ShowDebugTargetActor |
Show Debug Actor used if 'bShowDebugForReticleTarget' is true, only updated if trace from reticle hit a new Actor of class 'ShowDebugTargetDesiredClass' |
|
TSubclassOf< AA... |
ShowDebugTargetDesiredClass |
Class filter for selecting 'ShowDebugTargetActor' when 'bShowDebugForReticleTarget' is true. |
|
ToggledDebugCategories |
Array of names specifying what subsets of debug info to display for viewtarget actor. |
Name | Description | |
---|---|---|
|
AHUD ( |
Name | Description | ||
---|---|---|---|
|
AddActorToDebugList |
Utility function to add an actor to our consideration list for 'showdebug' Only consider visible, non destroyed Actors in the same world the player is in. |
|
|
AddComponentOwnerToDebugList ( |
Utility function to add a component's owner to our consideration list for 'showdebug' |
|
|
AddDebugText |
Add debug text for a specific actor to be displayed via DrawDebugTextList(). |
|
|
AddHitBox |
Add a hitbox to the hud |
|
|
AddPostRenderedActor ( |
Add an actor to the PostRenderedActors array |
|
|
AnyCurrentHitBoxHits() |
Have any hitboxes been hit this frame. |
|
|
Deproject |
Transforms a 2D screen location into a 3D location and direction |
|
|
Draw2DLine |
Draws a colored line between two points |
|
|
Draw3DLine |
Draws a colored line between two points |
|
|
DrawActorOverlays |
Draw overlays for actors that were rendered this tick and have added themselves to the PostRenderedActors array |
|
|
DrawDebugTextList() |
Iterate through list of debug text and draw it over the associated actors in world space. |
|
|
DrawHUD() |
The Main Draw loop for the hud. Gets called before any messaging. Should be subclassed |
|
|
DrawLine ( |
Draws a 2D line on the HUD. |
|
|
DrawMaterial ( |
Draws a material-textured quad on the HUD. |
|
|
DrawMaterialSimple ( |
Draws a material-textured quad on the HUD. Assumes UVs such that the entire material is shown. |
|
|
DrawMaterialTriangle ( |
||
|
DrawRect ( |
Draws a colored untextured quad on the HUD. |
|
|
DrawSafeZoneOverlay() |
Draw the safe zone debugging overlay when enabled |
|
|
DrawText ( |
Draws a string on the HUD. |
|
|
DrawTexture ( |
Draws a textured quad on the HUD. |
|
|
DrawTextureSimple |
Draws a textured quad on the HUD. Assumes 1:1 texel density. |
|
|
GetActorsInSelectionRectangle |
Returns the array of actors inside a selection rectangle, with a class filter. |
|
|
GetActorsInSelectionRectangle |
Returns the array of actors inside a selection rectangle, with a class filter. |
|
|
AActor * |
GetCurrentDebugTargetActor() |
Get Target to view 'showdebug' on |
|
GetDebugActorList |
Get list of considered targets for 'showdebug' This list is built contextually based on which 'showdebug' flags have been enabled. |
|
|
UFont * |
GetFontFromSizeIndex ( |
Messaging. |
|
const FHUDHi... |
GetHitBoxAtCoordinates |
Find the first hitbox containing the given coordinates. |
|
GetHitBoxesAtCoordinates ( |
Finds all the hitboxes containing the given coordinates. |
|
|
const FHUDHi... |
GetHitBoxWithName ( |
Return the hitbox with the given name |
|
APawn * |
GetOwningPawn() |
Returns the Pawn for this HUD's player. |
|
APlayerContr... |
GetOwningPlayerController() |
Returns the PlayerController for this HUD's player. |
|
GetTextSize |
Returns the width and height of a string. |
|
|
HandleBugScreenShot() |
Gives the HUD a chance to display project-specific data when taking a "bug" screen shot. |
|
|
IsCanvasValid_WarnIfNot() |
||
|
NextDebugTarget() |
Cycle to next target in our considered targets list for 'showdebug' |
|
|
NotifyBindPostProcessEffects() |
Called in PostInitializeComponents or postprocessing chain has changed (happens because of the worldproperties can define it's own chain and this one is set late). |
|
|
NotifyHitBoxBeginCursorOver ( |
Native handler, called when a hit box is moused over. |
|
|
NotifyHitBoxClick ( |
Native handler, called when a hit box is clicked on. Provides the name associated with that box. |
|
|
NotifyHitBoxEndCursorOver ( |
Native handler, called when a hit box no longer has the mouse over it. |
|
|
NotifyHitBoxRelease ( |
Native handler, called when a hit box is unclicked. Provides the name associated with that box. |
|
|
OnLostFocusPause ( |
Pauses or unpauses the game due to main window's focus being lost. |
|
|
PostRender() |
PostRender is the main draw loop. |
|
|
PreviousDebugTarget() |
Cycle to previous target in our considered targets list for 'showdebug' |
|
|
Project ( |
Transforms a 3D world-space vector into 2D screen coordinates |
|
|
ReceiveDrawHUD |
Hook to allow blueprints to do custom HUD drawing. |
|
|
ReceiveHitBoxBeginCursorOver ( |
Called when a hit box is moused over. |
|
|
ReceiveHitBoxClick ( |
Called when a hit box is clicked on. Provides the name associated with that box. |
|
|
ReceiveHitBoxEndCursorOver ( |
Called when a hit box no longer has the mouse over it. |
|
|
ReceiveHitBoxRelease ( |
Called when a hit box is unclicked. Provides the name associated with that box. |
|
|
RemoveAllDebugStrings() |
Remove all debug strings added via AddDebugText |
|
|
RemoveDebugText |
Remove debug strings for the given actor |
|
|
RemovePostRenderedActor ( |
Remove an actor from the PostRenderedActors array |
|
|
RenderHitBoxes ( |
Debug renderer for this frames hitboxes. |
|
|
SetCanvas |
Set the canvas and debug canvas to use during drawing |
|
|
ShouldDisplayDebug ( |
Check if we should be display debug information for particular types of debug messages. |
|
|
ShowDebug ( |
Toggles displaying properties of player's current ViewTarget DebugType input values supported by base engine include "AI", "physics", "net", "camera", and "collision" |
|
|
ShowDebugForReticleTargetToggle ( |
Toggles 'ShowDebug' from showing debug info between reticle target actor (of subclass |
|
|
ShowDebugInfo ( |
Entry point for basic debug rendering on the HUD. |
|
|
ShowDebugToggleSubCategory ( |
Toggles sub categories of show debug to customize display |
|
|
ShowHUD() |
Hides or shows HUD |
|
|
UpdateAndDispatchHitBoxClickEvents ( |
Update the list of hitboxes and dispatch events for any hits. |
|
|
UpdateHitBoxCandidates |
Update a the list of hitboxes that have been hit this frame. |
Name | Description | ||
---|---|---|---|
|
PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay |
Name |
Description |
---|---|
GreenColor |
|
OnHUDPostRender |
Called from ::PostRender. For less player/actor centered debugging. |
OnShowDebugInfo |
Callback allowing external systems to register to show debug info. |
RedColor |
|
WhiteColor |
Pre-defined FColors for convenience. |