Skip to content

Army and RPG HUD authoring ​

This revision uses public UIForge features. ForgeExamples owns the game rules. An existing game supplies its own selection, units, combat, quests and authority through IFDataSource. Neither army simulation nor an inventory backend is a core plugin dependency. Follow game integration for project setup and Blueprint settings for the complete settings workflow.

The current revision has scoped runtime/package verification; see current evidence and limits and the rework record. Earlier Todo receipts describe the prior presentation.

Mixed HUD input ​

In your IFScreen Blueprint defaults:

  1. Set Input Policy = Game And UI. Game And UI Mouse Capture = Capture During Mouse Down keeps the cursor visible and forwards ground presses to the game viewport. In UE5.8, NoCapture prevents the viewport from forwarding primary mouse-down events; it is unsuitable for world selection/right-click commands.
  2. Add your movement/order player-mappable row names to Gameplay Key Mappings. These use applied Enhanced Input bindings, so a remapped camera arrow still pans instead of navigating a focused button. The plugin forwards key-down/up to the local controller once and releases held inputs when another screen takes ownership. Text editors and key selectors retain input; disable Shortcuts Enabled for a custom editor or open it on a separate screen.
  3. Reserve only the gameplay axes needed in Gameplay Analog Keys. The examples use Gamepad_LeftX/Gamepad_LeftY; CommonUI keeps directional navigation for its other controls.
  4. The example HUDs set Show Keyboard Navigation Focus = false. Keyboard hotkeys update prompts without opening a tooltip on a parked focus target. Gamepad input still restores visible navigation focus immediately. Menus/dialogs keep keyboard navigation focus enabled. Enable this property for a HUD intended for direct keyboard widget navigation.
  5. Set Initial Focus Name to a nested control path, for example HUDLayout/Order3/EntryCommand; set Fallback Focus Name = HUDLayout/Pause. Set Back Action Name = Pause. Your adapter opens the pause screen and validates gameplay commands.

Do not set input modes repeatedly in Tick. CommonUI owns the active screen policy. Pause, settings and modal screens use Menu; world commands must stop while those screens own input. Physical controller and touch-device testing remains user-deferred/unverified; synthetic event coverage is recorded separately.

CommonUI owns focus restoration across stack activation. Initial Focus Name is the initial/fallback target, not a request to reset focus every time a submenu closes. Device-presentation refreshes reconcile cursor/style without replacing CommonUI's departing-control cache. Input actions are gated while a stack transition is in progress; wait until the new screen is active before issuing another navigation action.

A Blueprint roster with recycled entries ​

Create these objects in your game adapter using Construct Object from Class:

  • One IFPresentationData (or your own compatible UObject) per stable unit/item/quest identity.
  • One IFCollectionData for the visible selection, roster or quest collection.

Implement Get UI Model on IFDataSource: return the collection for the name Roster. When game selection changes, build an object array and call Set Items on that collection. Reuse each object's identity; do not recreate all objects when one health value changes. Set Items ignores nulls/duplicates and broadcasts only when membership/order changes. For health/title/count changes, edit the corresponding presentation object and call Notify Data Changed once.

Create a Widget Blueprint with parent IFReadoutEntry:

  1. Add an engine Tile View or List View named ItemList, with Is Variable checked.
  2. Set its Entry Widget Class to your entry Blueprint. The engine virtualizes the collection; scrolling recycles entries through the documented lifecycle.
  3. On the collection widget instance, set Model Name = Roster. No game-specific C++ widget class is required.

Create the entry Blueprint with parent IFReadoutEntry. Add any of TitleText, DetailText, ValueText, IconImage, FractionBar and EntryCommand; all are optional. Set Entry Action Name = SelectUnit. The optional command button receives the current entry object as action context. Your adapter's Request UI Action validates that identity and performs selection. On a manually authored entry, Set Command Context provides the same behavior. Reset subscriptions/context in Release Entry before reuse.

The saved RTS example uses WBP_IFArmyTile and WBP_IFArmyRoster. Its portrait buttons isolate a unit; Shift-click removes that unit from the current selection. List membership is game selection, so its engine list selection mode is None. A different game can use engine single/multiple list selection and forward On Item Selection Changed to its adapter instead.

For an arbitrary User Widget, implement IFEntry and User Object List Entry, then implement Initialize Entry, Refresh Entry, Set Entry Selected and Release Entry. The optional IFEntryWidget base already connects the engine list lifecycle. Your Blueprint can override On Entry Initialized, On Entry Refreshed, On Entry Selection Changed and On Entry Released. See entry contracts for the full lifecycle.

Selection feedback without UI polling ​

Add InterfaceForge Selection Overlay to the full-viewport canvas of your IFScreen, outside scaled HUD regions. Set Model Name = SelectionOverlay. Return an IFSelectionData from your adapter for that name.

For each selected/targeted entity, use Project World Location to Screen on the owning local controller. Divide the projected center and projected radius axes by that viewport's dimensions; append an IFSelectionMarker. Its center and two axes describe a projected ground ellipse, so perspective and aspect ratio are preserved. Set Color for your semantic state and Order Destination for a destination cross. Call Notify Data Changed once after updating the batch.

For a drag rectangle, set Marquee Visible, Marquee Start and Marquee End using normalized viewport coordinates. The overlay is passive and hit-test invisible. Your game performs picking/selection and owns entity lifetime; the widget never scans actors or Mass entities. The example adapter bounds its population and prunes dead selection references. Its viewport math demonstrates one local player; split-screen-specific projection has not been certified.

Map interaction and camera footprint ​

An InterfaceForge Map binds to IFMapData. Supply normalized Markers, an optional baked Background, and optional View Corners for a camera footprint; batch updates with Notify Data Changed. No runtime SceneCapture is required.

Set Location Action for primary click/touch and Alternate Location Action for secondary click. The selected normalized location is available on the map data. The Blueprint nodes Press Location, On Location Pressed and On Alternate Location Pressed also allow your own controls. Ironfront uses primary click to recenter the camera and secondary click to issue a move/attack-move order. The adapter converts map coordinates to world coordinates. Touch currently uses the primary action; author a separate action for secondary touch gestures.

For the map's default navigation control, focus it, then press Enter/controller south button to edit the map cursor. Arrows/D-pad move it; Enter/south confirms the primary action, Space/controller west triggers the alternate action, and Escape/east cancels. Each confirmation leaves cursor editing, so directional focus navigation can leave the map. These are the default UI controls; gameplay hotkeys use Enhanced Input remapping. Device hardware has not been tested.

Themes, compact controls and semantic states ​

Use your project IFTheme for typography, colors, sounds and default button padding. Named Button Styles and Surface Styles now skin controls and shared Window/Header/Combat/Row surfaces; see style authoring. A dense command tile can set Override Content Padding, Content Padding and Label Font Size locally. A size of zero follows the theme; accessibility text scale still applies. This avoids copying an entire theme for one small control.

Use an IFHUDLayoutProfile to name, anchor and size regions. Set Region Widget replaces a region with your Blueprint widget; Set Layout Profile replaces composition. Auto Height measures live content at the authored width, allowing enlarged/wrapped text to grow a panel; Size.Y remains its Designer preview estimate. Put related rows in a Vertical Box, as the example party stack does, so they move together instead of overlapping at fixed offsets. Keep virtualized scrolling collections in a bounded height. The current WBP_IFArmyRoster keeps its five group controls and selection grid in one Auto Height region. Its Blueprint Event On Entry Refreshed → Entry Data → Cast To IFCollectionData → Items → Length → (Count + 9) / 10 → Clamp (0,3) → ×50 → Set Height Override gives the grid zero, one, two or three rows. The height stays bounded for virtualization; selection changes drive the graph, without Tick.

Minimum Canvas Size optionally caps the composition's scale so essential regions stay on screen. This fit cap may limit the requested overall HUD scale in a narrow viewport; text enlargement remains available. Menus/settings use their own responsive composition.

For a compact strip whose captions must grow with text accessibility, enable Auto Height and Auto Width on its region. Use ordinary Vertical Boxes and Size Boxes with a minimum width inside each entry; allow captions to determine their natural width. Emberfall's action strip uses this pattern instead of squeezing enlarged words into a fixed icon width. Fixed-width cards wrap their headings; scrolling army tiles keep bounded geometry. The RTS menu, production queue and commands share a vertical OrdersDock, so content growth cannot move them through one another.

IFActionPrompt → Label Font Size controls the base key-label size; the player's text scale still applies. Use Refresh Prompt after changing it at runtime. Buttons similarly expose Label Font Size and optional Content Padding for compact controls. These are local overrides, not duplicated theme assets.

An IFReadoutEntry can opt into Use Model Accent for a semantic fraction-bar color. The RPG target frame uses Accent Color from its model to distinguish allies from hostiles, while the surrounding theme stays consistent. Ordinary widgets can bind their own colors in On Entry Refreshed.

The command atlas is original SVG geometry in ContentSource/UI/CommandVectors, with a deterministic raster import. Change an icon texture/data source or Icon UV Min/Max in Blueprint. No icon generation service is required.

RPG presentation and actual actions ​

Emberfall's action controls send requests through IFDataSource. Its example adapter handles continuing attack, movement interruption, contact timing, costs/recovery and target lifetime. The plugin owns no ability rules. Party entries request inspection of the selected ally; the target frame reads the same observable data contract.

WBP_IFQuestJournal reads the live Objective, QuestStory and TrackQuest models from the encounter adapter. Track changes HUD tracking; Return to Game uses Request Screen Back. It does not increment an unrelated observation counter. Replace those models with your quest system without changing the screen layout.

The action icon uses InterfaceForge Center Tint over the icon. It retains Sakura's inspected center-origin interior angular mask and its Percent, RemainingTimeOpacity, PassedTimeOpacity, StartAngle, Reverse and Color parameters. It is not a square perimeter or tube effect. See center tint. Replace the texture, tint opacities and orientation through ordinary Blueprint properties.

For smooth live progress, call Set Fraction (IFPresentationData) with your authoritative normalized value. On Fraction Changed updates an IFReadoutEntry's bars/tint without rebinding labels, loading icons or rebuilding its collection. Use Notify Data Changed for grouped title/detail/availability edits. The example sends only active cooldown fractions each frame and other presentation changes at a lower rate; pausing its adapter freezes both. The original material mask and its timing semantics are unchanged.

Scope ​

These are local MMO-style and RTS interfaces with a small responding game adapter. They do not implement online MMO services, an RTS economy, inventory or a multiplayer army simulation. CommonUI, settings, presentation, data contracts and Blueprint authoring are the UI product; the army/combat code is inspectable example integration.

UIForge v0.1.0 · Blueprint and C++ development documentation.

Enlarged documentation image

Enlarged documentation image