UI Mode
Documentation for ODK UI mode control
When opening a widget or in other various scenarios, you may want to the mouse to become visable and allow the player to interact with widgets on screen using the mouse. To do this, use the blueprint function library functions: MarkContextNeedsUIMode
and UnmarkContextNeedsUIMode
respectively.

You must provide a "Context" when calling these functions. This context represents the object who wants UI mode to be enabled/disabled.
If multiple calls are made to MarkContextNeedsUIMode
with different contexts, calling UnmarkContextNeedsUIMode
once with one of the contexts will not disable UI mode. The system will always ensure the highest UI mode is enabled that at least on context needs.
Handling UI Mode Changes
MarkContextNeedsUIMode
is a wrapper around the BPC_ODK_UIModeComponent
component attached to BP_ODK_PlayerControllerBase.
The BPC_ODK_UIModeComponent
is not repsonible for the effects of UI mode change (showing the cursor for example). It is simply responsible for the maintance of the current UI mode state. BP_ODK_PlayerControllerBase
handles the result of UI mode changes here:

BP_ODK_PlayerControllerBase
.If you require different logic to be perfomed when the UI mode changes, you can override the functionality is HandleUIModeChangeRequest
.
Last updated