Component:ButtonEditColorX: Difference between revisions

From Resonite Wiki
This is no longer a stub. Added a description, added a usage description. Added field descriptions.
Rewritten to be more accurate. Added example video. Added a link to see also.
 
Line 4: Line 4:
}}
}}


The '''ButtonEditColorX''' component takes in a [[Type:ColorX|ColorX]] and a [[Component:ColorDialogInterface|ColorDialogInterface]] component, and when a button interacts with it, the color is presumed to be edited. However, currently, if this component is under the button being pressed, it removes the button, making the [[Slot|slot]] useless. (TODO: Figure out what is going on with this component.)
The '''ButtonEditColorX''' component takes in a [[Type:ColorX|ColorX]] field, and when a button interacts with it, a [[Component:ColorDialogInterface|ColorDialogInterface]] is created for the [[User|user]] (if the user has [[Permission System|Builder]]).
 
{{Note|If the user does not have Builder and this component is under the button being pressed, it removes the button.|warning}}


{{Table ComponentFields
{{Table ComponentFields
Line 18: Line 20:


== Examples ==
== Examples ==
=== Videos ===
[[User:ProbablePrime|ProbablePrime's]] Video on '''ButtonEditColorX'''.
<youtube>RYJaQ6cCZzc</youtube>


== See Also ==
== See Also ==
* Inspectors use a different component for changing colors using [[Component:ColorXMemberEditor|ColorXMemberEditor]].


[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Edit Color X]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Edit Color X]]
[[Category:Components{{#translation:}}|Button Edit Color X]]
[[Category:Components{{#translation:}}|Button Edit Color X]]

Latest revision as of 00:20, 20 February 2025

Component image 
Button Edit Color X component as seen in the Scene Inspector


The ButtonEditColorX component takes in a ColorX field, and when a button interacts with it, a ColorDialogInterface is created for the user (if the user has Builder).

If the user does not have Builder and this component is under the button being pressed, it removes the button.
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.
Target IField`1<ColorX> The target ColorX.
_colorPicker direct SlotCleanupRef`1<ColorDialogInterface> The ColorDialogInterface component.
Continuous Bool Makes the color editing change continuous.
Alpha Bool Allows for use of the alpha channel.
HDR Bool Allows the use for HDR in this color.

Usage

This is used to edit colors with a press of a button.

Examples

Videos

ProbablePrime's Video on ButtonEditColorX.

See Also