mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Update docs for FocusableCheckBox
This commit is contained in:
parent
1b0b22bae6
commit
eead056575
@ -1,10 +1,14 @@
|
||||
# FocusableButton
|
||||
# Focusable Widgets
|
||||
|
||||
This widget fills some gaps in functionality of the standard Button, including
|
||||
better highlight rendering when the button has the keyboard / gamepad focus,
|
||||
and events you can listen in to when focus changes.
|
||||
This library includes some subclasses of core widgets to better handle focus,
|
||||
including better highlight rendering when the button has the keyboard / gamepad focus,
|
||||
events you can listen in to when focus changes, and more robust navigation.
|
||||
|
||||
Currently they include:
|
||||
|
||||
* FocusableButton (particularly useful in [Menus](Menus.md), but can be used anywhere)
|
||||
* FocusableCheckBox
|
||||
|
||||
FocusableButtons are particularly useful in [Menus](Menus.md), but can be used anywhere.
|
||||
|
||||
## Important: Disabling default focus rendering
|
||||
|
||||
@ -12,7 +16,7 @@ Unreal makes a token effort at providing a way to render which of your controls
|
||||
has the keyboard / gamepad focus, but it's rubbish. It's a grey dotted line
|
||||
that looks awful. No-one wants that.
|
||||
|
||||
The FocusableButton widget in this library provides a much nicer default focus
|
||||
The widgets in this library provide a much nicer default focus
|
||||
option (using the Hovered style), and also provides you focus events you can
|
||||
use to do something more advanced if you want. So we have no need for Unreal's
|
||||
dotted line nonsense.
|
||||
@ -25,7 +29,7 @@ All better. 😉
|
||||
|
||||
## Better Focus Highlighting
|
||||
|
||||
FocusableButton can highlight the button in the same way as the "Hover"
|
||||
Focusable widgets can highlight in the same way as the "Hover"
|
||||
style, thereby unifying how your button looks whether the player mouses over
|
||||
it, or selects it with keyboard / gamepad.
|
||||
|
||||
@ -46,10 +50,10 @@ one via the old focus and one where the mouse is hovering, which is confusing!
|
||||
|
||||
## Focus Events
|
||||
|
||||
FocusableButton also has 2 new events exposed, "On Focus Received" and "On Focus Lost".
|
||||
You can use this to track which button currently has the focus, which can be
|
||||
Focusable widgets also have 2 new events exposed, "On Focus Received" and "On Focus Lost".
|
||||
You can use this to track which widget currently has the focus, which can be
|
||||
useful if for example you want to use something else to indicate the current
|
||||
focus, like an icon or indicator that isn't part of the button itself.
|
||||
focus, like an icon or indicator that isn't part of the widget itself.
|
||||
|
||||
|
||||
|
@ -79,7 +79,7 @@ as being able to become part of a MenuStack. So our widget needs to be one of th
|
||||
### 3. Create the Menu Buttons
|
||||
|
||||
This library comes with a custom button which is perfect for menus, called
|
||||
[FocusableButton](FocusableButton.md). It has the advantage of automatically highlighting when
|
||||
[FocusableButton](FocusableWidgets.md). It has the advantage of automatically highlighting when
|
||||
focussed (e.g. gamepad or keyboard navigation).
|
||||
|
||||
1. Change the view mode (top-right) from Fill Screen to Desired
|
||||
|
@ -36,7 +36,7 @@ MouseUpButton|The button which will increment the selection index in mouse mode
|
||||
MouseDownImage|The image displayed inside the button for decrementing the selection index in mouse mode
|
||||
MouseUpImage|The image displayed inside the button for incrementing the selection index in mouse mode
|
||||
MouseText|The text widget which displays the selected item in mouse mode
|
||||
GamepadVersion|The container for all elements which will be shown when a gamepad is active (or keyboard navigation). This is almost certainly a [FocusableButton](FocusableButton.md) so it can hold focus.
|
||||
GamepadVersion|The container for all elements which will be shown when a gamepad is active (or keyboard navigation). This is almost certainly a [FocusableButton](FocusableWidgets.md) so it can hold focus.
|
||||
GamepadDownImage|The image displayed when decrementing the selection index in gamepad mode is allowed
|
||||
GamepadUpImage|The image displayed when incrementing the selection index in gamepad mode is allowed
|
||||
GamepadText|The text widget which displays the selected item in gamepad mode
|
||||
|
@ -34,12 +34,18 @@ Several custom widgets are supplied to assist with some common challenges:
|
||||
mouse pointer visibility, on both opening and closing, to make it easier
|
||||
to implement this common behaviour.
|
||||
|
||||
* [Focusable Button](FocusableButton.md)
|
||||
* [Focusable Button](FocusableWidgets.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).
|
||||
|
||||
* [Focusable CheckBox](FocusableWidgets.md)
|
||||
|
||||
An improved CheckBox widget which raises focus events you can listen to,
|
||||
is navigable by gamepad / keyboard, and which can apply the "Hovered"
|
||||
style to itself when focused.
|
||||
|
||||
* [Focusable User Widget](FocusableUserWidget.md)
|
||||
|
||||
A base class to use as an alternative to plain UserWidget if you want this
|
||||
|
Loading…
x
Reference in New Issue
Block a user