Cursor Component¶
Overview¶
UMIPCursorComponent changes the hardware cursor by gameplay tag or name. The tag's last child is used as the cursor name (e.g. Tag_Cursor_Default → "Default", Tag_Cursor_RepairOne → "RepairOne"); the engine looks for a matching image under Content/Slate (e.g. Default.png, RepairOne.png). It also subscribes to cursor hit target (e.g. for top-down) via OnCursorHitTarget.
Key traits:
- Attachment: PlayerController (client).
- Static API:
ChangeCursor(WorldContextObject, InCursorTag)(empty tag = "Default"),ChangeCursorWithName(WorldContextObject, InCursorName). - Implementation: Uses
UWidgetBlueprintLibrary::SetHardwareCursorwith the resolved name.
All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.
Key Classes & Files¶
| Class | File |
|---|---|
UMIPCursorComponent |
Public/Cursor/MIPCursorComponent.h |
UMIPCursorComponent¶
- Base: UMIPClientPlayerControllerComponent.
- Flow:
ClientBeginPlay_Implementation,EndPlay; binds to cursor hit target delegate;OnCursorHitTarget(InCursorHitInfo)for custom behavior (e.g. outline, targeting).
Integration¶
- UMIPItemSelectionComponent uses
ChangeCursorWithNamewith disabled cursor during selection and default when stopped. - UMIPTopDownPlayerControllerComponent / cursor hit: outline and ability targeting use the same hit info.