Skip to main content

Built-in Widgets

Ready-to-use widget classes included in the plugin. Each builds its own UMG layout in C++ and exposes style properties for customization. Subclass in Blueprint to override the visual design.

Overview

Targeting Widgets (ready to use)

Three concrete C++ classes for targeting UI, usable immediately:

WidgetDisplayNamePurpose
UERPBaseTargetFrameWidgetElys Target FrameHUD nameplate (name + icon)
UERPBaseTargetReticleWidgetElys Target ReticleWorld-space lock-on reticle
UERPBaseTargetHealthBarWidgetElys Target Health BarNameplate + health bar

Interaction Widgets

Three concrete widgets plus two abstract base classes for custom implementations:

WidgetDisplayNamePurpose
UERPBaseMultiPressChallengeWidgetElys Base Multi-Press Challenge"Mash [E]" counter + progress bar
UERPBaseRadialHoldWidgetElys Base Radial Hold ChallengeCircular fill (Souls/Zelda style)
UERPBaseWorldInteractionWidgetElys Base World Interaction PromptWorld-space prompt on interactable actors
UERPBaseTimedPressChallengeWidgetElys Base Timed Press ChallengeCountdown bar + key prompt (QTE)
UERPBaseTimingChallengeWidgetElys Base Timing ChallengeTrack with moving cursor + target zone (QTE)

Abstract base classes (implement in Blueprint for custom designs):

Base ClassDisplayNameRole
UERPInteractionWidgetBaseParent for all interaction prompts
UERPChallengeWidgetBaseParent for hold/multi-press challenge sub-widgets

See the Widget Guide for patterns and Blueprint implementation examples.


Targeting Widgets

UERPBaseTargetFrameWidget

Header: UI/Targeting/ERPBaseTargetFrameWidget.h

HUD panel displaying the current target's name and icon, with optional tag-based name coloring (hostile = red, friendly = green).

Layout

Overlay
├── BackgroundImage (semi-transparent)
└── HorizontalBox
├── IconSizeBox > IconImage (collapsed if no icon)
├── Spacer (4px)
└── NameText

Style Properties

PropertyTypeDefaultDescription
NameColorFLinearColorWhiteDefault name color (no tag match)
NameFontFSlateFontInfoBold 16Font for the target name
IconSizefloat32Width and height of the icon
BackgroundTintFLinearColorBlack 60%Background overlay color
ContentPaddingFMargin12, 8Padding around the content

Tag-Based Coloring

PropertyTypeDefaultDescription
HostileColorFLinearColorRedColor when target has HostileTag
FriendlyColorFLinearColorGreenColor when target has FriendlyTag
HostileTagFGameplayTag(none)Tag that marks a target as hostile
FriendlyTagFGameplayTag(none)Tag that marks a target as friendly

Priority order: hostile → friendly → default NameColor. Tags checked against FERPTargetDescriptor::TargetTags.

Configure tags in your subclass

Set HostileTag and FriendlyTag in the class defaults of your Blueprint subclass. Common values: Target.Hostile, Target.Friendly.

Behavior

  • OnDescriptorUpdated: Sets name text with tag-based color, loads icon from soft reference
  • OnTargetActiveChanged: Toggles visibility (HitTestInvisible / Collapsed)

BindWidget Names

BackgroundImage (Image), IconSizeBox (SizeBox), IconImage (Image), NameText (TextBlock)

Usage

UERPBaseTargetFrameWidget* Frame = CreateWidget<UERPBaseTargetFrameWidget>(PlayerController);
Frame->HostileTag = FGameplayTag::RequestGameplayTag("Target.Hostile");
Frame->FriendlyTag = FGameplayTag::RequestGameplayTag("Target.Friendly");
Frame->AddToViewport();

// Wire from TargetingComponent events:
Frame->UpdateFromDescriptor(Descriptor);
Frame->SetTargetActive(true);

UERPBaseTargetHealthBarWidget

Header: UI/Targeting/ERPBaseTargetHealthBarWidget.h

Extends UERPBaseTargetFrameWidget with a health bar row below the name/icon. Bar color interpolates from HealthFullColor (100%) to HealthLowColor (0%).

Layout

Overlay
├── BackgroundImage
└── VerticalBox
├── HorizontalBox: [IconSizeBox] + Spacer + NameText
├── Spacer (gap)
└── SizeBox > HealthBar

Additional Style Properties

PropertyTypeDefaultDescription
HealthFullColorFLinearColorGreenBar color at full health
HealthLowColorFLinearColorRedBar color at zero health
HealthBarHeightfloat6Height of the health bar

Inherits all style properties from UERPBaseTargetFrameWidget.

API

// Set health 0.0–1.0 (bar color interpolates automatically)
HealthBarWidget->SetHealthPercent(0.75f);

float Current = HealthBarWidget->GetHealthPercent();

BindWidget Names

Inherits BackgroundImage, IconSizeBox, IconImage, NameText, plus: HealthBar (ProgressBar)


UERPBaseTargetReticleWidget

Header: UI/Targeting/ERPBaseTargetReticleWidget.h

Minimal world-space reticle for soft-focus and lock-on visual states. Attach to a WidgetComponent on the target actor.

Layout

SizeBox
└── ReticleImage (tinted by focus/lock state)

Style Properties

PropertyTypeDefaultDescription
FocusedColorFLinearColorWhite 60%Color when soft-focused
LockedColorFLinearColorRedColor when locked on
ReticleSizefloat48Width and height of the reticle
ReticleBrushFSlateBrushSolid whiteBrush for the reticle image

API

Reticle->SetLockedOn(true);    // switches to LockedColor
Reticle->SetLockedOn(false); // switches to FocusedColor
bool bLocked = Reticle->IsLockedOn();

Delegates

DelegateSignatureDescription
OnLockStateChanged(bool bLockedOn)Broadcast when lock state changes

Behavior

  • OnTargetActiveChanged: Toggles visibility; resets lock state when target is lost
  • OnLockStateChangedEvent: BlueprintNativeEvent — override for custom animations

BindWidget Names

ReticleSizeBox (SizeBox), ReticleImage (Image)

Usage

// Wire from TargetingComponent
Event: OnTargetLocked (Target, Descriptor)
-> Reticle -> SetLockedOn(true)

Event: OnTargetUnlocked (PreviousTarget)
-> Reticle -> SetLockedOn(false)

Event: OnDomainCandidateChanged (Previous, New, ChannelId)
-> Reticle -> SetTargetActive(IsValid(New))

Customizing with Blueprint Subclasses

All targeting widgets support BindWidget override — provide your own UMG layout in a Blueprint subclass.

How It Works

  1. Create a Widget Blueprint, set its parent to the C++ class (e.g., UERPBaseTargetFrameWidget)
  2. In the UMG Designer, add widgets with the exact same names listed under BindWidget Names above
  3. Design your custom layout around those named widgets
  4. The C++ logic (descriptor updates, visibility toggling, color changes) works automatically with your designer widgets

All bound widgets use OptionalWidget = true — you only need to add the ones your design requires.


Interaction Widgets

Base Classes

Base ClassPurpose
UERPInteractionWidgetBaseParent for all interaction prompts. Handles descriptor, focus, key display.
UERPChallengeWidgetBaseParent for hold/multi-press challenge sub-widgets. Receives progress (0..1).

Concrete Interaction Widgets

Three ready-to-use interaction widgets are included:

WidgetDisplayNamePurpose
UERPBaseMultiPressChallengeWidgetElys Base Multi-Press Challenge"Mash [E]" press counter with progress bar
UERPBaseRadialHoldWidgetElys Base Radial Hold ChallengeCircular fill (Souls/Zelda style hold-to-interact)
UERPBaseWorldInteractionWidgetElys Base World Interaction PromptWorld-space prompt attached to the interactable actor

UERPBaseMultiPressChallengeWidget

Header: UI/Interaction/ERPBaseMultiPressChallengeWidget.h

Extends UERPChallengeWidgetBase. Displays a "Mash!" prompt with a press counter ("3 / 5") and progress bar.

Layout

Overlay
├── BackgroundImage
└── VerticalBox
├── PromptText ("Mash!")
├── CounterText ("3 / 5")
└── ProgressBar

Style Properties

PropertyTypeDefaultDescription
RequiredPressesint325Total presses needed (for counter display)
PromptLabelFText"Mash!"Text above the counter
CounterFontFSlateFontInfoBold 18Font for the counter
CounterTextColorFLinearColorWhiteCounter text color
PromptFontFSlateFontInfoRegular 14Font for the prompt
BarFillColorFLinearColorBlueProgress bar fill color
BackgroundTintFLinearColorBlack 60%Background color
ContentPaddingFMargin12, 8Padding around content

Behavior

  • OnChallengeProgressChanged: Computes CurrentPresses = Round(Progress * RequiredPresses), updates counter text and progress bar
  • OnChallengeCompleted: Sets counter to max, turns bar green (success) or red (failure)
  • OnChallengeReset: Resets counter to "0 / N" and bar to 0%

BindWidget Names

BackgroundImage (Image), PromptText (TextBlock), CounterText (TextBlock), ProgressBar (ProgressBar)


UERPBaseRadialHoldWidget

Header: UI/Interaction/ERPBaseRadialHoldWidget.h

Extends UERPChallengeWidgetBase. Circular fill challenge display driven by a UMaterialInstanceDynamic.

Layout

Overlay
└── SizeBox (RadialSize × RadialSize)
└── Overlay
├── TrackImage (background circle)
├── RadialFillImage (driven by MID)
└── VerticalBox
├── IconImage (collapsed by default)
└── PromptText

Style Properties

PropertyTypeDefaultDescription
FillColorFLinearColorBlueArc fill color (applied as "FillColor" MID param)
TrackColorFLinearColorDark gray 50%Background track color
RadialSizefloat96Width and height of the radial widget
PromptLabelFText(empty)Center text
PromptFontFSlateFontInfoRegular 12Center text font
MaterialAssetTSoftObjectPtr<UMaterialInterface>(none)Radial fill material (must have "Progress" scalar and "FillColor" vector params)

Material Setup

Create a material M_ERP_RadialFill with:

  • Scalar parameter Progress (0..1) — drives the arc fill amount
  • Vector parameter FillColor — tints the fill
  • Use atan2 on centered UVs to create a circular arc mask

If no material is assigned, the widget falls back to opacity-based feedback on a flat image.

BindWidget Names

TrackImage (Image), RadialFillImage (Image), IconImage (Image), PromptText (TextBlock)


UERPBaseWorldInteractionWidget

Header: UI/Interaction/ERPBaseWorldInteractionWidget.h

Extends UERPInteractionWidgetBase. Vertical-stacked prompt designed for world-space UWidgetComponent attachment on interactable actors.

Layout

Overlay
├── BackgroundImage
└── VerticalBox
├── IconSizeBox > IconImage (collapsed if no icon)
├── PromptText (object name)
└── KeyText ("[E]")

Style Properties

PropertyTypeDefaultDescription
BackgroundTintFLinearColorBlack 60%Background color
ContentPaddingFMargin12, 8Padding around content
PromptFontFSlateFontInfoRegular 14Object name font
KeyFontFSlateFontInfoBold 16Key badge font
KeyTextColorFLinearColorYellowKey text color
IconSizefloat32Width and height of the icon

Behavior

  • OnDescriptorUpdated: Sets prompt from ObjectName, key from primary action's input binding, loads icon with async fallback
  • OnFocusChanged: Toggles visibility (HitTestInvisible / Collapsed)

BindWidget Names

BackgroundImage (Image), IconSizeBox (SizeBox), IconImage (Image), PromptText (TextBlock), KeyText (TextBlock)

Usage

ERPInteractableComponent already supports world-space via its WidgetSpace property. Set the widget class to UERPBaseWorldInteractionWidget and configure WidgetSpace = World on the interactable component.


UERPBaseTimedPressChallengeWidget

Header: UI/Interaction/ERPBaseTimedPressChallengeWidget.h

Extends UERPChallengeWidgetBase. Displays a countdown bar that drains over time and a key prompt. Used with ERPTimedPressChallenge.

Layout

Overlay
├── BackgroundImage
└── VerticalBox
├── PromptText ("[E] Now!")
└── CountdownBar (fills from right to left)

Style Properties

PropertyTypeDefaultDescription
BarColorFLinearColorBlueBar color during normal countdown
BarUrgentColorFLinearColorRedBar color when remaining time is below UrgentThreshold
UrgentThresholdfloat0.25Progress value (0..1) below which the bar switches to BarUrgentColor
PromptFontFSlateFontInfoBold 16Font for the key prompt
PromptTextColorFLinearColorWhiteKey prompt text color
BackgroundTintFLinearColorBlack 60%Background color
ContentPaddingFMargin12, 8Padding around content

Behavior

  • OnChallengeProgressChanged: Updates bar fill percent and switches to BarUrgentColor when progress drops below UrgentThreshold
  • OnChallengeCompleted: Turns bar green (success) or red (failure)
  • OnChallengeReset: Resets bar to full and default color

BindWidget Names

BackgroundImage (Image), PromptText (TextBlock), CountdownBar (ProgressBar)


UERPBaseTimingChallengeWidget

Header: UI/Interaction/ERPBaseTimingChallengeWidget.h

Extends UERPChallengeWidgetBase. Displays a horizontal track with a moving cursor and a highlighted target zone. Used with ERPTimingChallenge.

Layout

SizeBox (TrackWidth x TrackHeight)
└── Overlay
├── TrackImage (background)
├── TargetZoneImage (green highlight, positioned and sized from challenge config)
└── CursorImage (thin vertical line, moves left/right)

Style Properties

PropertyTypeDefaultDescription
TrackWidthfloat300Width of the timing track
TrackHeightfloat32Height of the timing track
TrackColorFLinearColorDark gray 50%Background track color
TargetZoneColorFLinearColorGreen 60%Target zone highlight color
CursorColorFLinearColorWhiteCursor line color
CursorHitColorFLinearColorGreenCursor color on successful hit
CursorMissColorFLinearColorRedCursor color on miss
BackgroundTintFLinearColorBlack 60%Background color

Behavior

  • OnChallengeProgressChanged: Updates cursor position by reading GetCursorPosition() from the challenge; flashes cursor on hit/miss
  • OnChallengeCompleted: Stops cursor animation, shows success/failure state
  • OnChallengeReset: Resets cursor to start position and default colors

BindWidget Names

TrackImage (Image), TargetZoneImage (Image), CursorImage (Image)


Quick Start (Custom Interaction Widget)

For custom interaction widgets, use the abstract base classes and implement in Blueprint:

Event BeginPlay
-> Create Widget (WBP_ERP_SinglePrompt, Owning Player: Self)
-> Add to Viewport

-> Get ERPInteractionComponent
-> Bind OnDescriptorChanged:
-> Widget -> UpdateFromDescriptor(Descriptor)
-> Bind OnDomainCandidateChanged:
-> Branch: NOT IsValid(New)
True: Widget already handles collapse via OnFocusChanged

The component calls SetFocused() automatically when focus changes — the widget's default OnFocusChanged toggles HitTestInvisible / Collapsed.

See the Widget Guide for full implementation patterns:

  • Pattern 1: Single-Action Prompt
  • Pattern 2: Multi-Action List (DirectKeys)
  • Pattern 3: Action Wheel
  • Pattern 4 & 5: Hold and Multi-Press Challenge sub-widgets

Summary

ClassTypeUse Case
UERPBaseTargetFrameWidgetConcreteTarget nameplate HUD
UERPBaseTargetHealthBarWidgetConcreteTarget nameplate + health bar
UERPBaseTargetReticleWidgetConcreteWorld-space lock-on reticle
UERPBaseMultiPressChallengeWidgetConcrete"Mash [E]" press counter
UERPBaseRadialHoldWidgetConcreteCircular fill hold challenge
UERPBaseWorldInteractionWidgetConcreteWorld-space interaction prompt
UERPBaseTimedPressChallengeWidgetConcreteCountdown bar + key prompt (QTE)
UERPBaseTimingChallengeWidgetConcreteTrack with cursor + target zone (QTE)
UERPInteractionWidgetBaseAbstract baseInteraction prompt (implement in BP)
UERPChallengeWidgetBaseAbstract baseChallenge feedback (implement in BP)