2020-10-23 12:54:17 +01:00
|
|
|
# Widgets
|
|
|
|
|
|
|
|
|
|
|
|
Several custom widgets are supplied to assist with some common challenges:
|
|
|
|
|
|
|
|
* [OptionWidgetBase](OptionWidget.md)
|
|
|
|
|
|
|
|
This widget base class 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.
|
|
|
|
|
|
|
|
* [InputImage](InputImage.md)
|
|
|
|
|
|
|
|
This custom Image widget 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.
|
|
|
|
|
|
|
|
* [FocusableButton](FocusableButton.md)
|
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
* [FocusablePanel](FocusablePanel.md)
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2020-10-23 17:38:23 +01:00
|
|
|
* [MenuBase](Menus.md)
|
2020-10-23 12:54:17 +01:00
|
|
|
|
|
|
|
A specialised [FocusablePanel](FocusablePanel.md) which adds the ability
|
2020-10-23 17:38:23 +01:00
|
|
|
to be part of a contextual [MenuStack](Menus.md), and which
|
2020-10-26 15:42:15 +00:00
|
|
|
as it becomes the top of the stack can automatically grab focus if you
|
|
|
|
like. Each menu level can change game pause state, alter input modes, and change
|
|
|
|
the mouse pointer visibility if required (although if you're doing this for
|
|
|
|
the entire menu system, then best to use the parent MenuStack to do it).
|
2020-10-23 12:54:17 +01:00
|
|
|
|
2020-10-23 17:38:23 +01:00
|
|
|
* [MenuStack](Menus.md)
|
2020-10-23 12:54:17 +01:00
|
|
|
|
2020-10-23 17:38:23 +01:00
|
|
|
A container for and stack of [MenuBase](Menus.md) instances, making it
|
2020-10-23 12:54:17 +01:00
|
|
|
easy to create multi-level on-screen menus with a simple "back" navigation.
|
|
|
|
|
2020-10-26 15:42:15 +00:00
|
|
|
Stacks 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 create menu systems with this common behaviour.
|
|
|
|
|
2020-10-23 12:54:17 +01:00
|
|
|
|