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. |
|
TObjectPtr< UCa... |
Canvas |
Canvas to Draw HUD on. |
|
int32 |
CurrentTargetIndex |
Current target in our considered Targets list for 'showdebug' |
|
TObjectPtr< UCa... |
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 |
List of debug strings attached to actors, sorted by actor first, then by order of addition |
|
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. |
|
TObjectPtr< APl... |
PlayerOwner |
PlayerController which owns this HUD. |
|
PostRenderedActors |
Holds a list of Actors that need PostRender() calls. |
|
|
float |
RenderDelta |
Time since last HUD render. |
|
TObjectPtr< AAc... |
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 | ||
---|---|---|---|
|
void |
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. |
|
void |
AddComponentOwnerToDebugList ( |
Utility function to add a component's owner to our consideration list for 'showdebug' |
|
void |
AddDebugText |
Add debug text for a specific actor to be displayed via DrawDebugTextList(). |
|
void |
AddHitBox ( |
Add a hitbox to the hud |
|
void |
AddPostRenderedActor ( |
Add an actor to the PostRenderedActors array |
|
bool |
AnyCurrentHitBoxHits() |
Have any hitboxes been hit this frame. |
|
void |
Deproject ( |
Transforms a 2D screen location into a 3D location and direction |
|
void |
Draw2DLine ( |
Draws a colored line between two points |
|
void |
Draw3DLine ( |
Draws a colored line between two points |
|
void |
DrawActorOverlays ( |
Draw overlays for actors that were rendered this tick and have added themselves to the PostRenderedActors array |
|
void |
DrawDebugTextList() |
Iterate through list of debug text and draw it over the associated actors in world space. |
|
void |
DrawHUD() |
The Main Draw loop for the hud. Gets called before any messaging. Should be subclassed |
|
void |
DrawLine ( |
Draws a 2D line on the HUD. |
|
void |
DrawMaterial ( |
Draws a material-textured quad on the HUD. |
|
void |
DrawMaterialSimple ( |
Draws a material-textured quad on the HUD. Assumes UVs such that the entire material is shown. |
|
void |
DrawMaterialTriangle ( |
|
|
void |
DrawRect ( |
Draws a colored untextured quad on the HUD. |
|
void |
DrawSafeZoneOverlay() |
Draw the safe zone debugging overlay when enabled |
|
void |
DrawText ( |
Draws a string on the HUD. |
|
void |
DrawTexture ( |
Draws a textured quad on the HUD. |
|
void |
DrawTextureSimple ( |
Draws a textured quad on the HUD. Assumes 1:1 texel density. |
|
bool |
GetActorsInSelectionRectangle ( |
Returns the array of actors inside a selection rectangle, with a class filter. |
|
void |
GetActorsInSelectionRectangle ( |
Returns the array of actors inside a selection rectangle, with a class filter. |
|
AActor * |
GetCurrentDebugTargetActor() |
Get Target to view 'showdebug' on |
|
void |
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. |
|
void |
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. |
|
void |
GetTextSize |
Returns the width and height of a string. |
|
void |
HandleBugScreenShot() |
Gives the HUD a chance to display project-specific data when taking a "bug" screen shot. |
|
bool |
IsCanvasValid_WarnIfNot() |
|
|
void |
NextDebugTarget() |
Cycle to next target in our considered targets list for 'showdebug' |
|
void |
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). |
|
void |
NotifyHitBoxBeginCursorOver ( |
Native handler, called when a hit box is moused over. |
|
void |
NotifyHitBoxClick ( |
Native handler, called when a hit box is clicked on. Provides the name associated with that box. |
|
void |
NotifyHitBoxEndCursorOver ( |
Native handler, called when a hit box no longer has the mouse over it. |
|
void |
NotifyHitBoxRelease ( |
Native handler, called when a hit box is unclicked. Provides the name associated with that box. |
|
void |
OnLostFocusPause ( |
Pauses or unpauses the game due to main window's focus being lost. |
|
void |
PostRender() |
PostRender is the main draw loop. |
|
void |
PreviousDebugTarget() |
Cycle to previous target in our considered targets list for 'showdebug' |
|
FVector |
Project ( |
Transforms a 3D world-space vector into 2D screen coordinates |
|
void |
ReceiveDrawHUD ( |
Hook to allow blueprints to do custom HUD drawing. |
|
void |
ReceiveHitBoxBeginCursorOver ( |
Called when a hit box is moused over. |
|
void |
ReceiveHitBoxClick ( |
Called when a hit box is clicked on. Provides the name associated with that box. |
|
void |
ReceiveHitBoxEndCursorOver ( |
Called when a hit box no longer has the mouse over it. |
|
void |
ReceiveHitBoxRelease ( |
Called when a hit box is unclicked. Provides the name associated with that box. |
|
void |
RemoveAllDebugStrings() |
Remove all debug strings added via AddDebugText |
|
void |
RemoveDebugText ( |
Remove debug strings for the given actor |
|
void |
RemovePostRenderedActor ( |
Remove an actor from the PostRenderedActors array |
|
void |
RenderHitBoxes ( |
Debug renderer for this frames hitboxes. |
|
void |
SetCanvas |
Set the canvas and debug canvas to use during drawing |
|
bool |
ShouldDisplayDebug ( |
Check if we should be display debug information for particular types of debug messages. |
|
void |
ShowDebug ( |
Toggles displaying properties of player's current ViewTarget DebugType input values supported by base engine include "AI", "physics", "net", "camera", and "collision" |
|
void |
ShowDebugForReticleTargetToggle ( |
Toggles 'ShowDebug' from showing debug info between reticle target actor (of subclass |
|
void |
ShowDebugInfo ( |
Entry point for basic debug rendering on the HUD. |
|
void |
ShowDebugToggleSubCategory ( |
Toggles sub categories of show debug to customize display |
|
void |
ShowHUD() |
Hides or shows HUD |
|
bool |
UpdateAndDispatchHitBoxClickEvents ( |
Update the list of hitboxes and dispatch events for any hits. |
|
void |
UpdateHitBoxCandidates ( |
Update a the list of hitboxes that have been hit this frame. |
Name | Description | ||
---|---|---|---|
|
void |
PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay |
Name |
Description |
---|---|
OnHUDPostRender |
Called from ::PostRender. For less player/actor centered debugging. |
OnShowDebugInfo |
Callback allowing external systems to register to show debug info. |