Automated: create new component page |
This is no longer a stub. Added a description, added a useage description, added field descriptions, added example description. |
||
Line 3: | Line 3: | ||
|Name=Button Parent Under User | |Name=Button Parent Under User | ||
}} | }} | ||
The '''ButtonParentUnderUser''' component takes in a [[Slot|slot]] and some optional parameters for parenting slots. When a [[Type:IButton|IButton]] is pressed, this component will parent any slot provided to the user that pressed the button. | |||
{{Table ComponentFields | {{Table ComponentFields | ||
|Root|Slot| | |Root|Slot| The [[Slot|slot]] to parent to the user that pressed the button. | ||
|FindObjectRoot|Bool| | |FindObjectRoot|Bool| Looks upwards in the slot heirarchy to find the slot with the [[Component:ObjectRoot|Object Root]] component, and then parents that slot instead to the user. | ||
|UnparentWhenParented|Bool| | |UnparentWhenParented|Bool| Makes this component's parenting effects togglable. | ||
|PreserveOriginalSpace|Bool| | |PreserveOriginalSpace|Bool| Keep track of the original space. | ||
|_originalSpace|Slot| | |_originalSpace|Slot| The slot that represents the original space. | ||
}} | }} | ||
== | == Usage == | ||
Useful if you want certain slots to be parented to you when a button is pressed. | |||
== Examples == | == Examples == | ||
This is seen in the [[Scene Inspector]], [[ProtoFlux Node Browser]], and other menus with a button that has a pin icon. | |||
== See Also == | == See Also == | ||
Line 22: | Line 24: | ||
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Parent Under User]] | [[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Parent Under User]] | ||
[[Category:Components{{#translation:}}|Button Parent Under User]] | [[Category:Components{{#translation:}}|Button Parent Under User]] | ||
Latest revision as of 22:44, 11 September 2024
Component image
The ButtonParentUnderUser component takes in a slot and some optional parameters for parenting slots. When a IButton is pressed, this component will parent any slot provided to the user that pressed the button.
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. |
Root
|
Slot | The slot to parent to the user that pressed the button. |
FindObjectRoot
|
Bool | Looks upwards in the slot heirarchy to find the slot with the Object Root component, and then parents that slot instead to the user. |
UnparentWhenParented
|
Bool | Makes this component's parenting effects togglable. |
PreserveOriginalSpace
|
Bool | Keep track of the original space. |
_originalSpace
|
Slot | The slot that represents the original space. |
Usage
Useful if you want certain slots to be parented to you when a button is pressed.
Examples
This is seen in the Scene Inspector, ProtoFlux Node Browser, and other menus with a button that has a pin icon.