Component:ButtonStringAppend: Difference between revisions

From Resonite Wiki
Automated: update component fields
This is no longer a stub. Updated descriptions, added links.
 
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonStringAppendComponent.png
|Image=ButtonStringAppendComponent.png
Line 8: Line 7:
}}
}}


The ButtonStringAppend component can be used to add a string to the beginning or end of a string whenever a button is pressed.  
The '''ButtonStringAppend''' component can be used to add a [[Type:string|string]] to the beginning or end of a string whenever an [[Type:IButton|IButton]] is pressed.


<!--T:2-->
<!--T:2-->
Line 20: Line 19:
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
To function, the component simply needs to be attached to a slot that also has a button component attached to it. From then on, pressing that button will activate the ButtonStringAppend, making it append its <code>AppendString</code> to its <code>TargetString</code>.
To function, the component simply needs to be attached to a [[Slot|slot]] that also has a button component attached to it. From then on, pressing that button will activate the '''ButtonStringAppend''', making it append its <code>AppendString</code> to its <code>TargetString</code>.


<!--T:4-->
<!--T:4-->
Line 28: Line 27:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Button String Append]]
[[Category:Components{{#translation:}}|Button String Append]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button String Append]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button String Append]]

Latest revision as of 23:55, 11 September 2024

Component image 
Button String Append component as seen in the Scene Inspector


The ButtonStringAppend component can be used to add a string to the beginning or end of a string whenever an IButton is pressed.

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.
TargetString IField`1<String> The string to which AppendString will be added.
AppendString String The string to add to TargetString.
AppendInFront Bool Whether or not to add AppendString to the beginning of the string. (This does not reverse AppendString.)

Usage

To function, the component simply needs to be attached to a slot that also has a button component attached to it. From then on, pressing that button will activate the ButtonStringAppend, making it append its AppendString to its TargetString.

Examples

Related Components