Component:SetValue: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
 
Line 3: Line 3:
|Name=Set Value`1
|Name=Set Value`1
}}
}}
{{stub}}
Set Value is a component that is part of the [[undo]] system.


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Target|'''[[Type:IField`1|IField`1]]<T>'''|TypeAdv0=true|
|Target|'''[[Type:IField`1|IField`1]]<T>'''|TypeAdv0=true| The field edited by the user.
|ValueBefore|'''T'''|TypeAdv1=true|
|ValueBefore|'''T'''|TypeAdv1=true| The value before it was edited by the user.
|ValueAfter|'''T'''|TypeAdv2=true|
|ValueAfter|'''T'''|TypeAdv2=true| The value after it was edited by the user.
|_performed|Bool|
|_performed|Bool| Whether this has been done or has been undone instead.
|_description|String|
|_description|String| The description of this undo step.
}}
}}


Line 17: Line 17:


== Examples ==
== Examples ==
This component is generated by the [[Component:UndoManager|Undo Manager]] when a user edits a value field, usually through a [[Component:TextEditor|Text Editor]] inside of an inspector.


== See Also ==
== See Also ==
* [[undo|Undo System]]


[[Category:Components:Uncategorized{{#translation:}}|Set Value`1]]
[[Category:Components:Uncategorized{{#translation:}}|Set Value`1]]
[[Category:Components{{#translation:}}|Set Value`1]]
[[Category:Components{{#translation:}}|Set Value`1]]
[[Category:Generic Components{{#translation:}}|Set Value`1]]
[[Category:Generic Components{{#translation:}}|Set Value`1]]
[[Category:ComponentStubs]]

Latest revision as of 22:27, 19 October 2024

Component image 
Set Value`1 component as seen in the Scene Inspector

Set Value is a component that is part of the undo system.

Usage

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.
Target IField`1<T> The field edited by the user.
ValueBefore T The value before it was edited by the user.
ValueAfter T The value after it was edited by the user.
_performed Bool Whether this has been done or has been undone instead.
_description String The description of this undo step.

Behavior

Examples

This component is generated by the Undo Manager when a user edits a value field, usually through a Text Editor inside of an inspector.

See Also