Skip to content

CommonUI

In games that route input through CommonUI, a menu in Menu input mode makes the Common Game Viewport Client swallow game input, so a photo mode opened from a pause menu would get no input. Lensman handles this for you.

When your game’s Game Viewport Client is a Common Game Viewport Client, the photo mode screen is placed inside a Lensman Activatable Host, a CommonUI activatable widget, on top of everything else. It becomes the action router’s active root, so:

  • photo mode input is not blocked by a menu in Menu input mode: opening photo mode from a pause menu just works,
  • your menu’s own actions pause while photo mode is open,
  • closing photo mode returns to that menu, with its input settings,
  • deactivating the host from your code (for example from a layer stack) closes photo mode,
  • the mouse is captured while the menu is hidden and free otherwise.

The host is added on top of the screen, not pushed onto one of your stacks.

Project Settings > Plugins > ta Lensman CommonUI:

Setting Default Description
Use Activatable Host Auto Auto: when the viewport client is a Common Game Viewport Client. Always or Never.
Host Class Lensman Activatable Host To restyle the host, make a Widget Blueprint from Lensman Activatable Host with a panel named Content.
Follow Common Input Type On The button prompts follow CommonInput’s current input type (keyboard and mouse or gamepad).
Use Controller Data Icons On The button prompts use the key icons from your CommonInput controller data.

The settings are saved in Config/DefaultGame.ini.

With Use Controller Data Icons on, the prompts take their key icons from your project’s CommonInput controller data for the current gamepad: Xbox, PlayStation or Switch icons, whatever your data has. This works even in games that don’t use the host. Without controller data, the built-in keycaps are drawn.