Automated: create new component page |
add sync delegate desc |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|Name=List Editor | |Name=List Editor | ||
}} | }} | ||
== | The '''ListEditor''' component is a internal-use component intended to be used to generate UIX for editing an [[Type:ISyncBag|ISyncList]]. | ||
== Fields == | |||
{{Table ComponentFields | {{Table ComponentFields | ||
|_targetList|ISyncList| | |_targetList|ISyncList|The list to edit. | ||
|_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true| | |_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true|Button to add a new item to the list. | ||
}} | |||
== Sync Delegates == | |||
{{Table ComponentTriggers | |||
|AddNewPressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the add new item button is touched. | |||
|MoveUpPressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the move item up button is touched. | |||
|MoveDownPressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the move item down button is touched. | |||
|RemovePressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Called when the remove item button is touched. | |||
}} | }} | ||
== | == Usage == | ||
When <code>_targetList</code> receives a reference to a list, the ListEditor's slot's children will be populated with items in the list. Each of these child slots will have the name <code>Element</code>. Each slot contains a [[Component:HorizontalLayout|HorizontalLayout]] component and [[Component:RectTransform|RectTransform]] component. | |||
This component will misbehave when changing the <code>_targetList</code> after it already has a reference, as doing so is unintended behavior. | |||
This component is much less useful than its cousin, [[Component:BagEditor|BagEditor]], as it does not expose any method to reference the list members from in-game. FrooxEngine uses internal code to add references on child slots of the elements when building the [[Scene Inspector]] UI. | |||
== Examples == | == Examples == | ||
== See Also == | == See Also == | ||
* [[Component:BagEditor]] | |||
[[Category:Components:Uncategorized{{#translation:}}|List Editor]] | [[Category:Components:Uncategorized{{#translation:}}|List Editor]] | ||
[[Category:Components{{#translation:}}|List Editor]] | [[Category:Components{{#translation:}}|List Editor]] | ||
Latest revision as of 20:13, 7 April 2025

The ListEditor component is a internal-use component intended to be used to generate UIX for editing an ISyncList.
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. |
_targetList
|
ISyncList | The list to edit. |
_addNewButton
|
Button | Button to add a new item to the list. |
Sync Delegates
Method Name | Method type and Arguments. | Is the method hidden? | Description |
---|---|---|---|
AddNewPressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Called when the add new item button is touched. |
MoveUpPressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Called when the move item up button is touched. |
MoveDownPressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Called when the move item down button is touched. |
RemovePressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Called when the remove item button is touched. |
Usage
When _targetList
receives a reference to a list, the ListEditor's slot's children will be populated with items in the list. Each of these child slots will have the name Element
. Each slot contains a HorizontalLayout component and RectTransform component.
This component will misbehave when changing the _targetList
after it already has a reference, as doing so is unintended behavior.
This component is much less useful than its cousin, BagEditor, as it does not expose any method to reference the list members from in-game. FrooxEngine uses internal code to add references on child slots of the elements when building the Scene Inspector UI.