Automated: update Fields |
add info |
||
Line 7: | Line 7: | ||
|Name=Touch Button | |Name=Touch Button | ||
}} | }} | ||
The '''TouchButton''' component is used to make a physical button with no press depth that is instantly pressable upon click or touch. For a button with press depth, please see [[Component:PhysicalButton|PhysicalButton]]. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|IsPressed|Bool| | |IsPressed|Bool| Whether the button is pressed or not | ||
|IsHovering|Bool| | |IsHovering|Bool| Whether the button is being pointed at with the laser in the case of a touch button | ||
|AcceptPhysicalTouch|Bool| | |AcceptPhysicalTouch|Bool| Whether the button accepts input from [[Component:TipTouchSource|Tip Touch Sources]] | ||
|AcceptRemoteTouch|Bool| | |AcceptRemoteTouch|Bool| Whether the button accepts input via laser | ||
|AcceptOutOfSightTouch|Bool| | |AcceptOutOfSightTouch|Bool| Whether the button accepts input when it is outside the interacting user's view. | ||
|EditModeOnly|Bool| | |EditModeOnly|Bool| Whether this button will only work if the user is in [[Edit Mode]] | ||
|ActiveUserFilter|ActiveUserHandling| | |ActiveUserFilter|ActiveUserHandling| How to handle user interaction depending on active user. | ||
|Pressed|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv7=true| | |Pressed|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv7=true| The [[Sync Delegate]] to call when the button is pressed. | ||
|Pressing|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv8=true| | |Pressing|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv8=true| The [[Sync Delegate]] to call when the button is being pressed every game tick. | ||
|Released|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv9=true| | |Released|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv9=true| The [[Sync Delegate]] to call when the button is released. | ||
|BeginPressVibration|VibratePreset| | |BeginPressVibration|VibratePreset| What vibration to send when this button is starting to be pressed. | ||
|PressVibration|VibratePreset| | |PressVibration|VibratePreset| What vibration to send when this button is pressed. | ||
|HoverVibration|VibratePreset| | |HoverVibration|VibratePreset| What vibration to send when this button is hovered over via laser. | ||
|Label|'''[[Type:IField`1|IField`1]]<[[Type:String|String]]>'''|TypeAdv13=true| | |Label|'''[[Type:IField`1|IField`1]]<[[Type:String|String]]>'''|TypeAdv13=true| The field that represents this button's label. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Used in boopers and buttons where [[Component:PhysicalButton|PhysicalButton]] is a bad choice because the button press needs to have no press depth. In the case where the user does want press depth, use [[Component:PhysicalButton|PhysicalButton]]. | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
{{stub}} | |||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
* [[Type:IButton|IButton]] For a list of button types. | |||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Touch Button]] | [[Category:Components{{#translation:}}|Touch Button]] | ||
[[Category:Components:Transform:Interaction{{#translation:}}|Touch Button]] | [[Category:Components:Transform:Interaction{{#translation:}}|Touch Button]] |
Latest revision as of 17:07, 24 December 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
The TouchButton component is used to make a physical button with no press depth that is instantly pressable upon click or touch. For a button with press depth, please see PhysicalButton.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
IsPressed
|
Bool | Whether the button is pressed or not |
IsHovering
|
Bool | Whether the button is being pointed at with the laser in the case of a touch button |
AcceptPhysicalTouch
|
Bool | Whether the button accepts input from Tip Touch Sources |
AcceptRemoteTouch
|
Bool | Whether the button accepts input via laser |
AcceptOutOfSightTouch
|
Bool | Whether the button accepts input when it is outside the interacting user's view. |
EditModeOnly
|
Bool | Whether this button will only work if the user is in Edit Mode |
ActiveUserFilter
|
ActiveUserHandling | How to handle user interaction depending on active user. |
Pressed
|
ButtonEventHandler | The Sync Delegate to call when the button is pressed. |
Pressing
|
ButtonEventHandler | The Sync Delegate to call when the button is being pressed every game tick. |
Released
|
ButtonEventHandler | The Sync Delegate to call when the button is released. |
BeginPressVibration
|
VibratePreset | What vibration to send when this button is starting to be pressed. |
PressVibration
|
VibratePreset | What vibration to send when this button is pressed. |
HoverVibration
|
VibratePreset | What vibration to send when this button is hovered over via laser. |
Label
|
IField`1<String> | The field that represents this button's label. |
Usage
Used in boopers and buttons where PhysicalButton is a bad choice because the button press needs to have no press depth. In the case where the user does want press depth, use PhysicalButton.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
See Also
- IButton For a list of button types.