imported>Xekri +tutorial |
add info |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=TouchToggleComponent.png | |Image=TouchToggleComponent.png | ||
|Name=Touch Toggle | |Name=Touch Toggle | ||
}} | }} | ||
The '''TouchToggle''' component acts as a button that works as a check box, and the different Toggle on and off action can be mapped to certain Touch events. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|State|Bool| | |State|Bool| The checkbox state of this touch toggle. | ||
|EventType|TouchEventType| | |EventType|TouchEventType| the type of touch event to listen for different event states from. | ||
|ToggleEvent|EventState| | |ToggleEvent|EventState| The event state needed when touching to Toggle the <code>State</code> value. | ||
|OnEvent|EventState| | |OnEvent|EventState|The event state needed when touching to switch to true the <code>State</code> value. | ||
|OffEvent|EventState| | |OffEvent|EventState|The event state needed when touching to switch to false the <code>State</code> value. | ||
|AcceptOutOfSightTouch|Bool| | |AcceptOutOfSightTouch|Bool| {{Template:Touchable_AcceptOutOfSightTouch}} | ||
|AcceptPhysicalTouch|Bool| | |AcceptPhysicalTouch|Bool| {{Template:Touchable_AcceptPhysicalTouch}} | ||
|AcceptRemoteTouch|Bool| | |AcceptRemoteTouch|Bool| {{Template:Touchable_AcceptRemoteTouch}} | ||
|Vibrate|VibratePreset| | |Vibrate|VibratePreset| How to vibrate the user's hand when they touch the toggle. | ||
|EditModeOnly|Bool| | |EditModeOnly|Bool| Whether this is only available in edit mode. | ||
|ActiveUserFilter|ActiveUserHandling| | |ActiveUserFilter|ActiveUserHandling| how to filter users in the session who can interact with this component depending on the parent user. | ||
|__legacyActiveUserRootOnly|Bool| | |__legacyActiveUserRootOnly|Bool| Whether to use the legacy active user root. Internal. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
{{stub}} | |||
<!--T:4--> | <!--T:4--> | ||
Line 33: | Line 34: | ||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
* [[Type:IButton]] | |||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Touch Toggle]] | [[Category:Components{{#translation:}}|Touch Toggle]] | ||
[[Category:Components:Transform:Interaction{{#translation:}}|Touch Toggle]] | [[Category:Components:Transform:Interaction{{#translation:}}|Touch Toggle]] |
Latest revision as of 17:44, 5 February 2025
Component image 
Touch Toggle component as seen in the Scene Inspector

The TouchToggle component acts as a button that works as a check box, and the different Toggle on and off action can be mapped to certain Touch events.
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. Some components stop their functionality when this field is disabled, but some don't. |
State
|
Bool | The checkbox state of this touch toggle. |
EventType
|
TouchEventType | the type of touch event to listen for different event states from. |
ToggleEvent
|
EventState | The event state needed when touching to Toggle the State value.
|
OnEvent
|
EventState | The event state needed when touching to switch to true the State value.
|
OffEvent
|
EventState | The event state needed when touching to switch to false the State value.
|
AcceptOutOfSightTouch
|
Bool | Whether or not to allow interaction with this component if it is out of the user's view. |
AcceptPhysicalTouch
|
Bool | Whether to allow Component:TipTouchSources to interact with/activate this component. |
AcceptRemoteTouch
|
Bool | Whether this component allows interaction via the user's interaction laser. |
Vibrate
|
VibratePreset | How to vibrate the user's hand when they touch the toggle. |
EditModeOnly
|
Bool | Whether this is only available in edit mode. |
ActiveUserFilter
|
ActiveUserHandling | how to filter users in the session who can interact with this component depending on the parent user. |
__legacyActiveUserRootOnly
|
Bool | Whether to use the legacy active user root. Internal. |
Usage
This article or section is a Stub. You can help the Resonite Wiki by expanding it.