Button Events: Difference between revisions
Table formatting |
add line breaks to make intro more readable |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{SHORTDESC:Button events are a generalized event system for all button interactions.}}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|slot]], which is usually the same one it is attached to. Button events '''do not''' traverse hierarchies in the same way [[Dynamic Impulses]] do. | {{SHORTDESC:Button events are a generalized event system for all button interactions.}} | ||
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|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 (ProtoFlux)|Button Events node]]. | You can use button events in [[ProtoFlux]] by using the [[Button Events (ProtoFlux)|Button Events node]]. | ||
Line 38: | Line 43: | ||
! Component !! Hover Events !! Press Events !! Notes | ! Component !! Hover Events !! Press Events !! Notes | ||
|- | |- | ||
| [[Button | | [[Component:Button|Button]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonHoverEventRelay | | [[Component:ButtonHoverEventRelay|ButtonHoverEventRelay]] || {{Yes}} || {{No}} || Relays button hover events to a specifiable slot instead of its own. | ||
|- | |- | ||
| [[ButtonPressEventRelay | | [[Component:ButtonPressEventRelay|ButtonPressEventRelay]] || {{No}} || {{Yes}} || Relays button press events to a specifiable slot instead of its own. | ||
|- | |- | ||
| [[LegacyButton | | [[Component:LegacyButton|LegacyButton]] || {{No}} || {{Yes}} || Only supports '''Pressed''' and '''Released''', not '''Pressing'''. | ||
|- | |- | ||
| [[PhysicalButton | | [[Component:PhysicalButton|PhysicalButton]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[TouchButton | | [[Component:TouchButton|TouchButton]] || {{No}} || {{Yes}} || | ||
|} | |} | ||
Line 56: | Line 61: | ||
! Component !! Hover Events !! Press Events !! Notes | ! Component !! Hover Events !! Press Events !! Notes | ||
|- | |- | ||
| [[AudioStreamSpawner | | [[Component:AudioStreamSpawner|AudioStreamSpawner]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[AvatarCreatorSpawner | | [[Component:AvatarCreatorSpawner|AvatarCreatorSpawner]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonActionTrigger | | [[Component:ButtonActionTrigger|ButtonActionTrigger]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonAudioClipPlayer | | [[Component:ButtonAudioClipPlayer|ButtonAudioClipPlayer]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonAudioDeviceSet | | [[Component:ButtonAudioDeviceSet|ButtonAudioDeviceSet]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonClipboardCopyText | | [[Component:ButtonClipboardCopyText|ButtonClipboardCopyText]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonDelegateRelay´1 | | [[Component:ButtonDelegateRelay´1|ButtonDelegateRelay´1]] || {{No}} || {{Yes}} | ||
|- | |- | ||
| [[ButtonDestroy | | [[Component:ButtonDestroy|ButtonDestroy]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonDynamicImpulseTrigger | | [[Component:ButtonDynamicImpulseTrigger|ButtonDynamicImpulseTrigger]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonDynamicImpulseTriggerWithReference´1 | | [[Component:ButtonDynamicImpulseTriggerWithReference´1|ButtonDynamicImpulseTriggerWithReference´1]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonDynamicImpulseTriggerWithValue´1 | | [[Component:ButtonDynamicImpulseTriggerWithValue´1|ButtonDynamicImpulseTriggerWithValue´1]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonEditColorX | | [[Component:ButtonEditColorX|ButtonEditColorX]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonEnumShift´1 | | [[Component:ButtonEnumShift´1|ButtonEnumShift´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonHoverEventRelay | | [[Component:ButtonHoverEventRelay|ButtonHoverEventRelay]] || {{Yes}} || {{No}} || | ||
|- | |- | ||
| [[ButtonHoverRelay | | [[Component:ButtonHoverRelay|ButtonHoverRelay]] || {{Yes}} || {{No}} || | ||
|- | |- | ||
| [[ButtonLoopSet | | [[Component:ButtonLoopSet|ButtonLoopSet]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonOpenHome | | [[Component:ButtonOpenHome|ButtonOpenHome]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonParentUnderUser | | [[Component:ButtonParentUnderUser|ButtonParentUnderUser]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonPlaybackAction | | [[Component:ButtonPlaybackAction|ButtonPlaybackAction]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonPlaybackSeeker | | [[Component:ButtonPlaybackSeeker|ButtonPlaybackSeeker]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonPressEventRelay | | [[Component:ButtonPressEventRelay|ButtonPressEventRelay]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonReferenceCycle´1 | | [[Component:ButtonReferenceCycle´1|ButtonReferenceCycle´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonReferenceSet´1 | | [[Component:ButtonReferenceSet´1|ButtonReferenceSet´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonRefRelay´1 | | [[Component:ButtonRefRelay´1|ButtonRefRelay´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonRelay´1 | | [[Component:ButtonRelay´1|ButtonRelay´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonRelay | | [[Component:ButtonRelay|ButtonRelay]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonStringAppend | | [[Component:ButtonStringAppend|ButtonStringAppend]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonStringErase | | [[Component:ButtonStringErase|ButtonStringErase]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonToggle | | [[Component:ButtonToggle|ButtonToggle]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonUserProfileIconSet | | [[Component:ButtonUserProfileIconSet|ButtonUserProfileIconSet]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonValueCycle´1 | | [[Component:ButtonValueCycle´1|ButtonValueCycle´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonValueSet´1 | | [[Component:ButtonValueSet´1|ButtonValueSet´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonValueShift´1 | | [[Component:ButtonValueShift´1|ButtonValueShift´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ButtonWorldLink | | [[Component:ButtonWorldLink|ButtonWorldLink]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ContactLink | | [[Component:ContactLink|ContactLink]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[ContextMenuItem | | [[Component:ContextMenuItem|ContextMenuItem]] || {{Yes}} || {{Yes}} || | ||
|- | |- | ||
| [[ContextMenuItemSource | | [[Component:ContextMenuItemSource|ContextMenuItemSource]] || {{Yes}} || {{Yes}} || Despite not being a button event sender itself, it implements [[Type:IButton|IButton]] and can therefore be used with [[Button Events (ProtoFlux)|the Button Events ProtoFlux node]]. (It will proxy all button events it receives.) | ||
|- | |- | ||
| [[ContextMenuSubmenu | | [[Component:ContextMenuSubmenu|ContextMenuSubmenu]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[DataPreset | | [[Component:DataPreset|DataPreset]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[FileSystemItem | | [[Component:FileSystemItem|FileSystemItem]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[FullBodyCalibratorSpawner | | [[Component:FullBodyCalibratorSpawner|FullBodyCalibratorSpawner]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[GenericModalDialogSpawner´1 | | [[Component:GenericModalDialogSpawner´1|GenericModalDialogSpawner´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[GenericUserspaceDialogSpawner´1 | | [[Component:GenericUserspaceDialogSpawner´1|GenericUserspaceDialogSpawner´1]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[Hyperlink | | [[Component:Hyperlink|Hyperlink]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[InspectorMemberActions | | [[Component:InspectorMemberActions|InspectorMemberActions]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[InteractiveCameraSpawner | | [[Component:InteractiveCameraSpawner|InteractiveCameraSpawner]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[InventoryItemUI | | [[Component:InventoryItemUI|InventoryItemUI]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[RadiantDashButton | | [[Component:RadiantDashButton|RadiantDashButton]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[SlotRecord | | [[Component:SlotRecord|SlotRecord]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[Checkbox | | [[Component:Checkbox|Checkbox]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[Expander | | [[Component:Expander|Expander]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[Perspective360Panner | | [[Component:Perspective360Panner|Perspective360Panner]] || {{Yes}} || {{No}} | ||
|- | |- | ||
| [[Radio | | [[Component:Radio|Radio]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[TextField | | [[Component:TextField|TextField]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[VirtualCloseKey | | [[Component:VirtualCloseKey|VirtualCloseKey]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[VirtualKey | | [[Component:VirtualKey|VirtualKey]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[VirtualModifierKey | | [[Component:VirtualModifierKey|VirtualModifierKey]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[VirtualMultiKey | | [[Component:VirtualMultiKey|VirtualMultiKey]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[VirtualShift | | [[Component:VirtualShift|VirtualShift]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[WorldCloseAction | | [[Component:WorldCloseAction|WorldCloseAction]] || {{No}} || {{Yes}} || | ||
|- | |- | ||
| [[WorldThumbnailItem | | [[Component:WorldThumbnailItem|WorldThumbnailItem]] || {{Yes}} || {{Yes}} || | ||
|} | |} |
Latest revision as of 23:59, 4 June 2024
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.
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 | Yes | Yes | |
ButtonHoverEventRelay | Yes | No | Relays button hover events to a specifiable slot instead of its own. |
ButtonPressEventRelay | No | Yes | Relays button press events to a specifiable slot instead of its own. |
LegacyButton | No | Yes | Only supports Pressed and Released, not Pressing. |
PhysicalButton | No | Yes | |
TouchButton | No | Yes |