Component:ButtonPlaybackAction: Difference between revisions

From Resonite Wiki
Automated: update Categories
This is no longer a stub. Added a description, added usage description, added field descriptions.
 
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonPlaybackActionComponent.png
|Image=ButtonPlaybackActionComponent.png
|Name=Button Playback Action
|Name=Button Playback Action
}}
}}
The '''ButtonPlaybackAction''' component takes in an [[Type:IPlayable|IPlayable]]. When an [[Type:IButton|IButton]] is pressed while this component is in the same [[Slot|slot]], it will set the action on this playable media depending on what is set up in this component.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Playback|IPlayable|
|Playback|IPlayable| The playable media itself.
|OnHover|PlaybackAction| The action to take when the button is hovered over.
|OnHover|PlaybackAction| The action to take when the button is hovered over.
|OnLeave|PlaybackAction| The action to take when the button is left.
|OnLeave|PlaybackAction| The action to take when the button is left.
Line 20: Line 21:
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Basically your media buttons (<code>Play</code>, <code>Pause</code>, <code>Resume</code>, and <code>Stop</code>) that can be setup anywhere.


<!--T:4-->
<!--T:4-->
Line 27: Line 29:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components:Common UI:Button Interactions:Media{{#translation:}}|Button Playback Action]]
[[Category:Components:Common UI:Button Interactions:Media{{#translation:}}|Button Playback Action]]
[[Category:Components{{#translation:}}|Button Playback Action]]
[[Category:Components{{#translation:}}|Button Playback Action]]

Latest revision as of 02:14, 12 September 2024

Component image 
Button Playback Action component as seen in the Scene Inspector


The ButtonPlaybackAction component takes in an IPlayable. When an IButton is pressed while this component is in the same slot, it will set the action on this playable media depending on what is set up in this component.

Fields

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.
Playback IPlayable The playable media itself.
OnHover PlaybackAction The action to take when the button is hovered over.
OnLeave PlaybackAction The action to take when the button is left.
OnPress PlaybackAction The action to take when the button is pressed.
OnRelease PlaybackAction The action to take when the button is released.

Usage

Basically your media buttons (Play, Pause, Resume, and Stop) that can be setup anywhere.

Examples

Related Components