Skip to content

Commit afe2a32

Browse files
committed
Additional info on key bind display + formatting
1 parent 55ae67a commit afe2a32

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

modules/ROOT/pages/Development/Satisfactory/EnhancedInputSystem.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,24 @@ UMyModGameInstanceModule* MyModGameInstanceModule = Cast<UMyModGameInstanceModul
190190
EnhancedInputComponent->BindAction(MyModGameInstanceModule->InputActionTagBindings[FGameplayTag::RequestGameplayTag(TEXT("Tag.Name"))], ETriggerEvent::Triggered, this, &Class::Function);
191191
```
192192

193-
== Reading Input Action Information
193+
== Displaying Information about Input Actions
194194

195195
In order to retrieve the name(s) of the key(s) bound to an action for display to the user,
196196
call the FGInputLibrary function `Get Input Action Name as Text`
197197
on a Player Controller instance passing in the Name given to the action in its Mapping Context.
198198
This will automatically handle multi-key binds and display them in a combined format like `Left Alt + Q`.
199199
Note that if the mapping context is not registered at call time you will get back `UNKNOWN_KEY()`.
200200

201+
The "Get Key Name For Action Simple" function may also be useful.
202+
Supply it with the player-mappable key settings Name of the action
203+
and it will return a text representation of the action.
204+
For example, given `PlayerActions_Use`, it will return `E` (by default).
205+
206+
For buildables, the output of the "Get Look At Description" function
207+
will be rendered as rich text by the base game.
208+
To get the "orange box" around the keybind, use rich text formatting hints like this:
209+
`Press <Key>{KeyName}</> to {ActionDescription}`.
210+
201211
If you need to retrieve the exact key structures involved in an input action,
202212
call the FGInputLibrary function `Get Current Mapping for Action`
203213
on a Player Controller instance passing in the Name given to the action in its Mapping Context.

0 commit comments

Comments
 (0)