Skip to content

UAndromedaInteractPromptWidget

Kind: class Source: Source/Andromeda/UI/AndromedaInteractPromptWidget.h Base classes: UUserWidget

Details

Base widget for displaying the current focused object's interaction prompt.

Protected Properties

Member Type Summary
PromptRoot TObjectPtr< UWidget > Optional bound root widget to show or collapse.
PromptTextBlock TObjectPtr< UTextBlock > Optional bound text block for prompt text; expected by the default UI.
CurrentPromptText FText Transient prompt text currently displayed by the widget.

Public Methods

Member Type Summary
SetPrompt void Stores prompt text, then refreshes widget output.
ClearPrompt void Clears prompt text, then refreshes widget output.
GetPromptText FText Returns current prompt text.
HasPrompt bool Returns true when non-empty prompt text is present.

Protected Methods

Member Type Summary
NativeOnInitialized void Logs a warning if PromptTextBlock is not bound.
RefreshPrompt void Updates text and visibility from current prompt state.

Members

PromptRoot

TObjectPtr< UWidget > PromptRoot

Optional bound root widget to show or collapse.

PromptTextBlock

TObjectPtr< UTextBlock > PromptTextBlock

Optional bound text block for prompt text; expected by the default UI.

CurrentPromptText

FText CurrentPromptText

Transient prompt text currently displayed by the widget.

SetPrompt

void UAndromedaInteractPromptWidget::SetPrompt(const FText &InPromptText)

Stores prompt text, then refreshes widget output.

Parameters:

Name Type Description
InPromptText const FText & Player-facing prompt text to display.

ClearPrompt

void UAndromedaInteractPromptWidget::ClearPrompt()

Clears prompt text, then refreshes widget output.

GetPromptText

FText UAndromedaInteractPromptWidget::GetPromptText() const

Returns current prompt text.

Returns:

CurrentPromptText currently stored by the widget.

HasPrompt

bool UAndromedaInteractPromptWidget::HasPrompt() const

Returns true when non-empty prompt text is present.

This prevents showing an empty prompt panel for objects that have no player-facing action text.

Returns:

True when the prompt should be visible.

NativeOnInitialized

void UAndromedaInteractPromptWidget::NativeOnInitialized() override

Logs a warning if PromptTextBlock is not bound.

RefreshPrompt

void UAndromedaInteractPromptWidget::RefreshPrompt()

Updates text and visibility from current prompt state.

Visible prompts use hit-test-invisible visibility so the HUD does not intercept input. When PromptRoot is unbound, visibility is applied to the whole widget.