1.7 KiB
Widgets
Several custom widgets are supplied to assist with some common challenges:
-
A widget that adds "option switch" functionality, allowing a user to select one of a number of options by moving through them in a linear list. It handles both mouse and gamepad by automatically switching styles between separate clickable arrows for mouse, and a unified left/right rocker style for gamepads. Styleable in Blueprint subclasses.
-
A custom Image widget that takes an Action or Axis name and will automatically display the image for an associated bound control, based on the currently active input method. Dynamically switches as input method changes.
-
A couple of classes to make it easy to create multi-level on-screen menus with a simple "back" navigation. They're compatible with mouse and gamepad/keyboard navigation and deal with a bunch of edge cases around switching between those.
Menus can change the game pause state, alter input modes and change the mouse pointer visibility, on both opening and closing, to make it easier to implement this common behaviour.
-
A refined Button widget which raises focus events you can listen to, and which can apply the "Hovered" style to itself when focused (very important for gamepad navigation).
-
A Panel widget which can make sure that something is selected when a gamepad is in use, and resists loss of focus. Has a default focus widget, and also remembers the last focus widget if you switch away & back without destroying it.