> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/odk-docs/odk-plugin/odk-input-management/ui-mode.md).

# UI Mode

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.

<figure><img src="/files/ypoA8EiFljXD5EllKAwI" alt=""><figcaption><p>Example of function usage</p></figcaption></figure>

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:

<figure><img src="/files/C6JW0bRimis0SiS1XmTD" alt=""><figcaption><p>Handling of UI mode changes on the <code>BP_ODK_PlayerControllerBase</code> .</p></figcaption></figure>

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/odk-docs/odk-plugin/odk-input-management/ui-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
