Button Events

Button events are a generalized event system for all button interactions.
Revision as of 20:14, 18 January 2024 by JackTheFoxOtter (talk | contribs) (More grammar tweaks)

Button events provide a generalized system for buttons and actions triggered by buttons within Resonite. This abstraction allows components to define behaviors as responses to common button interactions without having to know the specific button the interaction originates from. When a button event sender component triggers an event, it will call all corresponding button event receiver components on a single target slot, which is usually the same one it is attached to. Button events do not traverse hierarchies in the same way Dynamic Impulses do.

You can use button events in ProtoFlux by using the Button Events node.

The order in which multiple button event receiver components on the same slot are executed is not defined, as the order of components on a slot itself isn't defined and may change. If order of execution is important, consider using ProtoFlux instead!

Event Types

Button events are separated into two categories, each defining 3 event types:

Hover Events
Hover Enter
Hover Stay
Hover Leave
Press Events
Pressed
Pressing
Released

Components that act as receivers for either or both of those event categories implement IButtonPressReceiver and IButtonHoverReceiver respectively.

Button Event Data

Each button event carries event data with information about the interaction the event originates from.

Property Name Property Type
Source Component
Global Press Point Float3
Local Press Point Float2
Normalized Press Point Float2

Button Event Senders

Component Hover Events Press Events Notes
Button (Component) Yes Yes
ButtonHoverEventRelay (Component) Yes No Relays button hover events to a specifiable slot instead of its own.
ButtonPressEventRelay (Component) No Yes Relays button press events to a specifiable slot instead of its own.
LegacyButton (Component) No Yes Only supports Pressed and Released, not Pressing.
PhysicalButton (Component) No Yes
TouchButton (Component) No Yes

Button Event Handlers

Component Hover Events Press Events Notes
AudioStreamSpawner (Component) No Yes
AvatarCreatorSpawner (Component) No Yes
ButtonActionTrigger (Component) No Yes
ButtonAudioClipPlayer (Component) Yes Yes
ButtonAudioDeviceSet (Component) No Yes
ButtonClipboardCopyText (Component) No Yes
ButtonDelegateRelay´1 (Component) No Yes
ButtonDestroy (Component) No Yes
ButtonDynamicImpulseTrigger (Component) Yes Yes
ButtonDynamicImpulseTriggerWithReference´1 (Component) Yes Yes
ButtonDynamicImpulseTriggerWithValue´1 (Component) Yes Yes
ButtonEditColorX (Component) No Yes
ButtonEnumShift´1 (Component) No Yes
ButtonHoverEventRelay (Component) Yes No
ButtonHoverRelay (Component) Yes No
ButtonLoopSet (Component) Yes Yes
ButtonOpenHome (Component) No Yes
ButtonParentUnderUser (Component) No Yes
ButtonPlaybackAction (Component) Yes Yes
ButtonPlaybackSeeker (Component) No Yes
ButtonPressEventRelay (Component) No Yes
ButtonReferenceCycle´1 (Component) No Yes
ButtonReferenceSet´1 (Component) No Yes
ButtonRefRelay´1 (Component) No Yes
ButtonRelay´1 (Component) No Yes
ButtonRelay (Component) No Yes
ButtonStringAppend (Component) No Yes
ButtonStringErase (Component) No Yes
ButtonToggle (Component) No Yes
ButtonUserProfileIconSet (Component) No Yes
ButtonValueCycle´1 (Component) No Yes
ButtonValueSet´1 (Component) No Yes
ButtonValueShift´1 (Component) No Yes
ButtonWorldLink (Component) No Yes
ContactLink (Component) No Yes
ContextMenuItem (Component) Yes Yes
ContextMenuItemSource (Component) Yes Yes Despite not being a button event sender itself, it implements IButton and can therefore be used with the Button Events ProtoFlux node. (It will proxy all button events it receives.)
ContextMenuSubmenu (Component) No Yes
DataPreset (Component) No Yes
FileSystemItem (Component) No Yes
FullBodyCalibratorSpawner (Component) No Yes
GenericModalDialogSpawner´1 (Component) No Yes
GenericUserspaceDialogSpawner´1 (Component) No Yes
Hyperlink (Component) No Yes
InspectorMemberActions (Component) No Yes
InteractiveCameraSpawner (Component) No Yes
InventoryItemUI (Component) No Yes
RadiantDashButton (Component) No Yes
SlotRecord (Component) No Yes
Checkbox (Component) No Yes
Expander (Component) No Yes
Perspective360Panner (Component) Yes No
Radio (Component) No Yes
TextField (Component) No Yes
VirtualCloseKey (Component) No Yes
VirtualKey (Component) No Yes
VirtualModifierKey (Component) No Yes
VirtualMultiKey (Component) No Yes
VirtualShift (Component) No Yes
WorldCloseAction (Component) No Yes
WorldThumbnailItem (Component) Yes Yes