Skip to content

AAndromedaHUD

Kind: class Source: Source/Andromeda/UI/AndromedaHUD.h Base classes: AHUD

Details

HUD coordinator for interaction prompt and suit scan recall widgets.

Protected Properties

Member Type Summary
InteractPromptWidgetClass TSubclassOf< UAndromedaInteractPromptWidget > Widget class used for interaction prompts.
SuitScanRecallWidgetClass TSubclassOf< UAndromedaSuitScanRecallWidget > Widget class used for scan recall.
InteractPromptWidget TObjectPtr< UAndromedaInteractPromptWidget > Runtime prompt widget instance.
SuitScanRecallWidget TObjectPtr< UAndromedaSuitScanRecallWidget > Runtime scan recall widget instance.
CurrentFocusedObject TObjectPtr< UObject > Object currently represented in prompt UI.
FocusedPromptEventsComponent TObjectPtr< UAndromedaCapabilityEventsComponent > Prompt event source for the current focused object.
CurrentConnectedStation TObjectPtr< AAndromedaStation > Station used for scan recall records.
bInteractionPromptVisible bool Visibility gate for prompt display.

Public Methods

Member Type Summary
ClearInteractionPrompt void Clears focus prompt state and refreshes the prompt widget.
SetInteractionPromptVisible void Globally gates interaction prompt display.
ToggleScanRecall void Shows or hides the scan recall widget.
HideScanRecall void Hides scan recall when the widget exists.

Protected Methods

Member Type Summary
BeginPlay void Creates widgets and subscribes to pawn/station events.
EndPlay void Removes prompt, character, and station event subscriptions.
SubscribeToCharacter void Binds character focus and scan recall delegates.
UnsubscribeFromCharacter void Removes character delegate bindings.
SetFocusedObject void Rebinds prompt events and refreshes prompt state for new focus.
SubscribeToPromptEvents void Subscribes to the focused object's prompt event source when available.
UnsubscribeFromPromptEvents void Removes the current prompt event binding.
SubscribeToStationEvents void Subscribes to station-domain events through the station event subsystem.
UnsubscribeFromStationEvents void Removes station-domain event subscriptions.
RefreshStationAccessForOwningPawn void Rebuilds connected station state for the current owning pawn.
CreateInteractPromptWidget void Creates the interaction prompt widget when a class is configured.
CreateSuitScanRecallWidget void Creates the suit scan recall widget when a class is configured.
RefreshInteractionPrompt void Reconciles focused-object prompt state with the prompt widget.
GetFocusedObjectPrompt FText Resolves prompt text through IAndromedaPromptableInterface.
GetFocusedObjectPromptEvents UAndromedaCapabilityEventsComponent * Resolves prompt refresh event source through IAndromedaPromptableInterface.
RefreshScanRecall void Builds scan recall contents from the current station databank.
HandleFocusedObjectChanged void Receives character focus changes and updates prompt focus.
HandleFocusedPromptCapabilityChanged void Refreshes prompt text for same-focus capability changes.
HandleScanRecallRequested void Toggles scan recall in response to character input.
HandlePawnEnteredStationAccess void Tracks station access for the owning pawn.
HandlePawnExitedStationAccess void Removes station access for the owning pawn.

Members

InteractPromptWidgetClass

TSubclassOf< UAndromedaInteractPromptWidget > InteractPromptWidgetClass

Widget class used for interaction prompts.

SuitScanRecallWidgetClass

TSubclassOf< UAndromedaSuitScanRecallWidget > SuitScanRecallWidgetClass

Widget class used for scan recall.

InteractPromptWidget

TObjectPtr< UAndromedaInteractPromptWidget > InteractPromptWidget

Runtime prompt widget instance.

SuitScanRecallWidget

TObjectPtr< UAndromedaSuitScanRecallWidget > SuitScanRecallWidget

Runtime scan recall widget instance.

CurrentFocusedObject

TObjectPtr< UObject > CurrentFocusedObject

Object currently represented in prompt UI.

FocusedPromptEventsComponent

TObjectPtr< UAndromedaCapabilityEventsComponent > FocusedPromptEventsComponent

Prompt event source for the current focused object.

CurrentConnectedStation

TObjectPtr< AAndromedaStation > CurrentConnectedStation

Station used for scan recall records.

bInteractionPromptVisible

bool bInteractionPromptVisible

Visibility gate for prompt display.

ClearInteractionPrompt

void AAndromedaHUD::ClearInteractionPrompt()

Clears focus prompt state and refreshes the prompt widget.

SetInteractionPromptVisible

void AAndromedaHUD::SetInteractionPromptVisible(bool bVisible)

Globally gates interaction prompt display.

Parameters:

Name Type Description
bVisible bool True to allow prompt display, false to clear/hide it.

ToggleScanRecall

void AAndromedaHUD::ToggleScanRecall()

Shows or hides the scan recall widget.

HideScanRecall

void AAndromedaHUD::HideScanRecall()

Hides scan recall when the widget exists.

BeginPlay

void AAndromedaHUD::BeginPlay() override

Creates widgets and subscribes to pawn/station events.

EndPlay

void AAndromedaHUD::EndPlay(const EEndPlayReason::Type EndPlayReason) override

Removes prompt, character, and station event subscriptions.

Parameters:

Name Type Description
EndPlayReason const EEndPlayReason::Type

SubscribeToCharacter

void AAndromedaHUD::SubscribeToCharacter(APawn *PawnToSubscribe)

Binds character focus and scan recall delegates.

Parameters:

Name Type Description
PawnToSubscribe APawn * Pawn that may be an AAndromedaCharacter.

UnsubscribeFromCharacter

void AAndromedaHUD::UnsubscribeFromCharacter(APawn *PawnToUnsubscribe)

Removes character delegate bindings.

Parameters:

Name Type Description
PawnToUnsubscribe APawn * Pawn that may be an AAndromedaCharacter.

SetFocusedObject

void AAndromedaHUD::SetFocusedObject(UObject *NewFocusedObject)

Rebinds prompt events and refreshes prompt state for new focus.

Parameters:

Name Type Description
NewFocusedObject UObject * New object reported by the character, or nullptr.

SubscribeToPromptEvents

void AAndromedaHUD::SubscribeToPromptEvents(UObject *NewFocusedObject)

Subscribes to the focused object's prompt event source when available.

Parameters:

Name Type Description
NewFocusedObject UObject * Object whose prompt events should be observed.

UnsubscribeFromPromptEvents

void AAndromedaHUD::UnsubscribeFromPromptEvents()

Removes the current prompt event binding.

SubscribeToStationEvents

void AAndromedaHUD::SubscribeToStationEvents()

Subscribes to station-domain events through the station event subsystem.

UnsubscribeFromStationEvents

void AAndromedaHUD::UnsubscribeFromStationEvents()

Removes station-domain event subscriptions.

RefreshStationAccessForOwningPawn

void AAndromedaHUD::RefreshStationAccessForOwningPawn()

Rebuilds connected station state for the current owning pawn.

CreateInteractPromptWidget

void AAndromedaHUD::CreateInteractPromptWidget()

Creates the interaction prompt widget when a class is configured.

CreateSuitScanRecallWidget

void AAndromedaHUD::CreateSuitScanRecallWidget()

Creates the suit scan recall widget when a class is configured.

RefreshInteractionPrompt

void AAndromedaHUD::RefreshInteractionPrompt()

Reconciles focused-object prompt state with the prompt widget.

This is the single prompt presentation refresh point. Focus changes, prompt visibility changes, and same-focus capability changes update HUD state first, then call this method to either show the current focused object's prompt text or clear the widget when prompting is disabled, focus is missing, or the focused object no longer exposes a non-empty prompt.

GetFocusedObjectPrompt

FText AAndromedaHUD::GetFocusedObjectPrompt(UObject *Object) const

Resolves prompt text through IAndromedaPromptableInterface.

Parameters:

Name Type Description
Object UObject * Focused object to query.

Returns:

Prompt text when Object can show a prompt, otherwise empty text.

GetFocusedObjectPromptEvents

UAndromedaCapabilityEventsComponent * AAndromedaHUD::GetFocusedObjectPromptEvents(UObject *Object) const

Resolves prompt refresh event source through IAndromedaPromptableInterface.

Parameters:

Name Type Description
Object UObject * Focused object to query.

Returns:

Prompt event source, or nullptr.

RefreshScanRecall

void AAndromedaHUD::RefreshScanRecall()

Builds scan recall contents from the current station databank.

HandleFocusedObjectChanged

void AAndromedaHUD::HandleFocusedObjectChanged(UObject *OldFocusedObject, UObject *NewFocusedObject)

Receives character focus changes and updates prompt focus.

Parameters:

Name Type Description
OldFocusedObject UObject * Previous focused object.
NewFocusedObject UObject * New focused object.

HandleFocusedPromptCapabilityChanged

void AAndromedaHUD::HandleFocusedPromptCapabilityChanged()

Refreshes prompt text for same-focus capability changes.

HandleScanRecallRequested

void AAndromedaHUD::HandleScanRecallRequested()

Toggles scan recall in response to character input.

HandlePawnEnteredStationAccess

void AAndromedaHUD::HandlePawnEnteredStationAccess(AAndromedaStation *Station, APawn *Pawn)

Tracks station access for the owning pawn.

Parameters:

Name Type Description
Station AAndromedaStation * Station whose access event fired.
Pawn APawn * Pawn that entered access.

HandlePawnExitedStationAccess

void AAndromedaHUD::HandlePawnExitedStationAccess(AAndromedaStation *Station, APawn *Pawn)

Removes station access for the owning pawn.

Parameters:

Name Type Description
Station AAndromedaStation * Station whose access event fired.
Pawn APawn * Pawn that exited access.