fill out more data |
add info |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|_targetBag|ISyncBag|The bag to edit. | |_targetBag|ISyncBag|The bag to edit. | ||
|_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true| | |_addNewButton|'''[[Component:Button|Button]]'''|TypeAdv1=true|Button to add a new item to the bag. | ||
}} | |||
== Sync Delegates == | |||
{{Table ComponentTriggers | |||
|AddNewPressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Handles adding new items to the bag of items. | |||
|RemovePressed:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Handles removing items from the bag of items. | |||
}} | }} | ||
Line 22: | Line 28: | ||
This component will misbehave when changing the <code>_targetBag</code> after it already has a reference, as doing so is unintended behavior. | 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]]. | This component is frequently used in conjunction with [[Ref Hacking]], as it exposes reference IDs in the element slot names. | ||
<!--T:4--> | <!--T:4--> |
Latest revision as of 22:34, 18 March 2025

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
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. |
_targetBag
|
ISyncBag | The bag to edit. |
_addNewButton
|
Button | Button to add a new item to the bag. |
Sync Delegates
Method Name | Method type and Arguments. | Is the method hidden? | Description |
---|---|---|---|
AddNewPressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Handles adding new items to the bag of items. |
RemovePressed:ButtonEventHandler
|
ButtonEventHandler | ✓ | Handles removing items from the bag of items. |
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, as it exposes reference IDs in the element slot names.