Component:BagEditor: Difference between revisions

From Resonite Wiki
Automated: update Fields
fill out more data
Line 1: Line 1:
BagEditor is a internal-use component used to generate UIX for editing a type of collection called a Bag. Some examples of Bags include the UserBag, SlotBag and WorkerBag.
<languages></languages>
<languages></languages>
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=BagEditorComponent.png
|Image=BagEditorComponent.png
|Name=Bag Editor
|Name=Bag Editor
}}
}}
The '''BagEditor''' component is a internal-use component intended to be used to generate UIX for editing an [[Type:ISyncBag|ISyncBag]]. Some examples of Bags include the UserBag, SlotBag and WorkerBag.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|_targetBag|ISyncBag|
|_targetBag|ISyncBag|The bag to edit.
|_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true|
|_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true|
}}
}}
Line 19: Line 18:
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
When <code>_targetBag</code> receives a reference to a bag, the BagEditor's slot's children will be populated with items in the bag. Each of these child slots will have the name <code>Element - IDXXXXXX</code>, where <code>IDXXXXX</code> is the [[Type:RefID|Reference ID]] of the element. Each child slot contains a [[Component:BagEditorItem|BagEditorItem]] component with a reference to items in the bag.
This component will misbehave when changing the <code>_targetBag</code> after it already has a reference, as doing so is unintended behavior.
This component is frequently used in conjunction with [[Ref Hacking]].


<!--T:4-->
<!--T:4-->
Line 24: Line 28:


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
* [[Component:ListEditor]]
 
</translate>
</translate>
[[Category:ComponentStubs]]
 
[[Category:Components{{#translation:}}|Bag Editor]]
[[Category:Components{{#translation:}}|Bag Editor]]
[[Category:Components:Uncategorized{{#translation:}}|Bag Editor]]
[[Category:Components:Uncategorized{{#translation:}}|Bag Editor]]

Revision as of 21:00, 26 May 2024

Component image 
Bag Editor component as seen in the Scene Inspector


The BagEditor component is a internal-use component intended to be used to generate UIX for editing an ISyncBag. Some examples of Bags include the UserBag, SlotBag and WorkerBag.

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.
_targetBag ISyncBag The bag to edit.
_addNewButton Button

Usage

When _targetBag receives a reference to a bag, the BagEditor's slot's children will be populated with items in the bag. Each of these child slots will have the name Element - IDXXXXXX, where IDXXXXX is the Reference ID of the element. Each child slot contains a BagEditorItem component with a reference to items in the bag.

This component will misbehave when changing the _targetBag after it already has a reference, as doing so is unintended behavior.

This component is frequently used in conjunction with Ref Hacking.

Examples

See Also