Input Components¶
Overview¶
Input is split between management of input context objects (cursor, mapping contexts) and binding of Enhanced Input to quick slots, toggleable widgets, and key-hold actions. UMIPPlayerInputManagerComponent holds a map of tag → input context object and provides cursor/input mode helpers. UMIPEnhancedInputComponent binds from a config asset to quick slot, widget toggle, and key-hold callbacks.
Key traits:
- UMIPPlayerInputManagerComponent – Client-only; owns
InputContextObjectClasses(tag → class) and runtimeInputContextObjects; init/clear/reinit; show/hide cursor and set UI-only vs game+UI input mode. - UMIPEnhancedInputComponent – UEnhancedInputComponent;
BindInputConfig(InputConfig); routes quick slot, toggleable widget, and key-hold events to the appropriate components (QuickBar, ClientWidgetsManager, etc.).
All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.
Key Classes & Files¶
| Class | File |
|---|---|
UMIPPlayerInputManagerComponent |
Public/Input/MIPPlayerInputManagerComponent.h |
UMIPEnhancedInputComponent |
Public/Input/MIPEnhancedInputComponent.h |
UMIPPlayerInputManagerComponent¶
- Base: UMIPClientPlayerControllerComponent.
- Attachment: PlayerController (client).
- API:
InitInputContextObjects(),ClearAllMappings(),ReinitializeContextObjects(),ShowCursorAndSetUIOnlyMode(),HideCursorAndSetGameAndUIMode(). - Properties:
InputContextObjects(runtime map: FGameplayTag → UMIPBasePlayerPawnInputContextObject),InputContextObjectClasses(tag → TSubclassOf). Context objects are not ActorComponents; they are UObject-based.
UMIPEnhancedInputComponent¶
- Base: UEnhancedInputComponent (Enhanced Input).
- Attachment: PlayerController (replaces or augments default input component).
- API:
BindInputConfig(InputConfig)– binds fromUMIPInputConfigAssetto quick slot (pressed/released/held), toggleable widget (pressed/released/held), key-hold (pressed/released/held). Caches refs to ASC, QuickBarComponent, ClientWidgetsManagerComponent, PlayerDynamicTagsContainer for callbacks. - Callbacks (protected):
QuickSlotInputPressed/Released/Held(InQuickSlotIndex),ToggleableWidgetInputPressed/Released/Held(InTag),KeyHoldInputPressed/Released/Held(InTag).
Integration¶
- UMIPCursorComponent and UI input mode are often driven by the same input context or by UMIPPlayerInputManagerComponent (ShowCursor/HideCursor).
- UMIPQuickBarComponent receives quick slot input from UMIPEnhancedInputComponent.
- UMIPClientWidgetsManagerComponent receives toggleable widget input for opening/closing panels.