Show Action Prompts
Display the current keyboard or gamepad binding without implementing gameplay in the UI.
In a project containing the updated GameUI sources, open Components → Feedback → ActionPrompt in Studio. Set label to “Otwórz skrzynię”, keyLabel to “E”, and bound to true in Preview props. These are preview values, not a keyboard assignment. Unreal must supply the real binding when the game runs.
<import component="ActionPrompt" from="./components/feedback/ActionPrompt.calmui" />
<template>
<ActionPrompt actionId="inventory.open"
label="$loc('GameUI::Example.OpenChest', 'Otwórz skrzynię')"
keyLabel="E" :bound="true" />
</template>The component is a label, not a button. It never binds keys, takes focus, consumes pointer input, or executes the named action. Your game or its enclosing button still owns activation. Its height follows the text; long key names and action labels wrap rather than being hidden.
Component props
| Prop | Meaning |
|---|---|
actionId | Stable game-defined identity, or the ui.* identity returned by the UI resolver |
label | Localized description of the action |
keyLabel | Current host-supplied key/chord label |
bound | False shows the unassigned state, even if an old key label remains |
device | keyboard-mouse or gamepad |
glyph | Optional packaged/host-mapped image source owned by your project |
disabled | Muted presentation only; disable the owning action/button separately |
unboundLabel | Optional localized replacement for “Nie przypisano” |
elementId | Unique instance identifier; defaults to action-prompt |
An empty key label is unbound. The default unbound text uses
GameUI::ActionPrompt.Unbound. The text remains beside an optional glyph, so the
prompt stays readable without artwork. CalmUI does not distribute platform
controller artwork. Register assets through the asset workflow.
Compose a prompt overlay
The starter includes ActionPrompts, a passthrough overlay View bound to
actionPrompts.entries. Open it in Studio to inspect the mock prompt. Mock keys
are not live Unreal bindings. Build/import Gameplay before connecting a game.
The component library deliberately does not include a copied Player Controller, presenter or gameplay adapter. In your own game, query the active input mapping, publish the resulting label, key and bound state to the fields used by your View, and refresh that data when the input device, mapping or culture changes. Keep action authorization in the game; a bound key is not permission to execute it.
Compatibility
Starter schema 10 adds actionPrompts.entries and its typed keyed records.
Rebuild every package sharing the starter schema and reimport the matching assets
together. This does not change ActionPrompt props or the .cuipack format. Do not
replace an existing game's schema with the sample wholesale; merge its new group
and fields deliberately.
Query a binding for a custom View
Start in your owning Player Controller Blueprint after Open CalmUI Screen → Completed. Use Self as Player Controller. Do not use another player's controller or run the writes from the immediate execution output.
- Create a custom event
RefreshPromptin that Blueprint. - For interface navigation, call Get CalmUI Action Prompt, using Player Controller = Self and Action = Accept. It reads the effective profile, including UI modifier keys and player rebindings.
- Break the returned Calm Ui Action Prompt structure. Read Key Label, Bound, Device and Action Id. Key is also available for your licensed glyph lookup. Never infer a platform's artwork from the label.
- For automatic refresh, get the advanced Local Player
subsystem and bind
OnCalmUiInputPromptsChanged to
RefreshPromptand callRefreshPromptonce immediately. The event supplies a revision, not the new descriptor; query it again inside the event. - Unbind this specific event on the owning Blueprint's EndPlay. Do not unbind all listeners belonging to other UI owners.
Get CalmUI Gameplay Action Prompt is the equivalent for gameplay. Set
Action Id to your stable name, such as inventory.open, and Action to the
existing Enhanced Input Action asset your game uses. It reads that local player's
currently rebuilt Enhanced Input mappings. A null action, empty identity, removed
mapping, or no key for the active device returns Bound = false.
If several keys are mapped, the gameplay resolver selects the first valid key in stable key-name order for the active device. It reports the physical key, not whether gameplay currently permits the action. Custom chord triggers, hold/tap instructions and input-mode availability remain game-owned presentation data. Do not interpret Bound as permission to execute an operation.
Publish a custom projection
In Store → State Groups, add a per-player group with Store Path prompt and
these fields: string keyLabel, bool bound, string device, string actionId.
Initialize them to empty text, false, keyboard-mouse, and empty text. Create four
Store Field Reference variables in the Player Controller and select those paths
from the same package as the View.
Inside RefreshPrompt, use the batched Store update workflow:
begin the compact batch, set the three strings and one bool, then commit.
Convert Device explicitly to gamepad or keyboard-mouse. Check every setter
and commit result; roll back the batch on failure. Bind the four corresponding
ActionPrompt props to these Store fields using Studio's binding examples.
Keep label as your translated action description.
The visible result is the active binding, followed by your action label. Rebinding or changing devices refreshes the Store projection without rebuilding the View. Gameplay remains in Enhanced Input/C++/Blueprint, not in the component script.
Input and lifecycle details
The subsystem observes routed game-viewport key and axis events for its local player, including gameplay keys outside the CalmUI navigation profile. Analog noise below the threshold and unchanged held-axis values do not switch prompts. For custom input paths that bypass the viewport, call Notify CalmUI Input Method when your host accepts input from a different device. This notification does not inject an action.
The prompt change event also covers successful UI profile changes, Enhanced Input mapping rebuilds, and culture changes. Use Get CalmUI Input Prompt Revision for owner-side caching if needed. Viewport delegates detach when the subsystem ends or moves to a different viewport.
C++ uses the same UCalmUiLocalPlayerSubsystem getters and
FCalmUiActionPrompt descriptor. No browser-only renderer or new package format
is involved. Actual controller hot-plug/platform-glyph acceptance still needs
the game's target devices; simulated engine events are engineering checks only.
If the wrong key remains visible, first query the descriptor again. If it is correct, check your Store field references and event binding. If it is unbound, check the owning Local Player, active mapping context, and completed Enhanced Input rebuild. Studio mock props do not alter Unreal's input mapping.