FrameIT
|
A reusable component with a self-contained UI for rebinding a single action. More...
Classes | |
class | InteractiveRebindEvent |
class | UpdateBindingUIEvent |
Public Member Functions | |
bool | ResolveActionAndBinding (out InputAction action, out int bindingIndex) |
Return the action and binding index for the binding that is targeted by the component according to More... | |
void | UpdateBindingDisplay () |
Trigger a refresh of the currently displayed binding. More... | |
void | ResetToDefault () |
Remove currently applied binding overrides. More... | |
void | StartInteractiveRebind () |
Initiate an interactive rebind that lets the player actuate a control to choose a new binding for the action. More... | |
Protected Member Functions | |
void | OnEnable () |
void | OnDisable () |
Properties | |
InputActionReference | actionReference [getset] |
Reference to the action that is to be rebound. More... | |
string | bindingId [getset] |
ID (in string form) of the binding that is to be rebound on the action. More... | |
InputBinding.DisplayStringOptions | displayStringOptions [getset] |
Text | actionLabel [getset] |
Text component that receives the name of the action. Optional. More... | |
Text | bindingText [getset] |
Text component that receives the display string of the binding. Can be null in which case the component entirely relies on updateBindingUIEvent. More... | |
Text | rebindPrompt [getset] |
Optional text component that receives a text prompt when waiting for a control to be actuated. More... | |
GameObject | rebindOverlay [getset] |
Optional UI that is activated when an interactive rebind is started and deactivated when the rebind is finished. This is normally used to display an overlay over the current UI while the system is waiting for a control to be actuated. More... | |
UpdateBindingUIEvent | updateBindingUIEvent [get] |
Event that is triggered every time the UI updates to reflect the current binding. This can be used to tie custom visualizations to bindings. More... | |
InteractiveRebindEvent | startRebindEvent [get] |
Event that is triggered when an interactive rebind is started on the action. More... | |
InteractiveRebindEvent | stopRebindEvent [get] |
Event that is triggered when an interactive rebind has been completed or canceled. More... | |
InputActionRebindingExtensions.RebindingOperation | ongoingRebind [get] |
When an interactive rebind is in progress, this is the rebind operation controller. Otherwise, it is null . More... | |
Private Member Functions | |
void | PerformInteractiveRebind (InputAction action, int bindingIndex, bool allCompositeParts=false) |
void | UpdateActionLabel () |
Static Private Member Functions | |
static void | OnActionChange (object obj, InputActionChange change) |
Private Attributes | |
InputActionReference | m_Action |
string | m_BindingId |
InputBinding.DisplayStringOptions | m_DisplayStringOptions |
Text | m_ActionLabel |
Text | m_BindingText |
GameObject | m_RebindOverlay |
Text | m_RebindText |
UpdateBindingUIEvent | m_UpdateBindingUIEvent |
InteractiveRebindEvent | m_RebindStartEvent |
InteractiveRebindEvent | m_RebindStopEvent |
InputActionRebindingExtensions.RebindingOperation | m_RebindOperation |
Static Private Attributes | |
static List< RebindActionUI > | s_RebindActionUIs |
A reusable component with a self-contained UI for rebinding a single action.
|
staticprivate |
|
protected |
|
protected |
|
private |
void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.ResetToDefault | ( | ) |
Remove currently applied binding overrides.
bool UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.ResolveActionAndBinding | ( | out InputAction | action, |
out int | bindingIndex | ||
) |
Return the action and binding index for the binding that is targeted by the component according to
action | |
bindingIndex |
void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.StartInteractiveRebind | ( | ) |
Initiate an interactive rebind that lets the player actuate a control to choose a new binding for the action.
|
private |
void UnityEngine.InputSystem.PlayerControls.RebindUI.RebindActionUI.UpdateBindingDisplay | ( | ) |
Trigger a refresh of the currently displayed binding.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
getset |
Text component that receives the name of the action. Optional.
|
getset |
Reference to the action that is to be rebound.
|
getset |
ID (in string form) of the binding that is to be rebound on the action.
|
getset |
Text component that receives the display string of the binding. Can be null
in which case the component entirely relies on updateBindingUIEvent.
|
getset |
|
get |
When an interactive rebind is in progress, this is the rebind operation controller. Otherwise, it is null
.
|
getset |
Optional UI that is activated when an interactive rebind is started and deactivated when the rebind is finished. This is normally used to display an overlay over the current UI while the system is waiting for a control to be actuated.
If neither rebindPrompt nor rebindOverlay
is set, the component will temporarily replaced the bindingText (if not null
) with "Waiting..."
.
|
getset |
Optional text component that receives a text prompt when waiting for a control to be actuated.
|
get |
Event that is triggered when an interactive rebind is started on the action.
|
get |
Event that is triggered when an interactive rebind has been completed or canceled.
|
get |
Event that is triggered every time the UI updates to reflect the current binding. This can be used to tie custom visualizations to bindings.