ElementsData & charts
AddLoadoutGroup
Adds a selectable loadout strip with item cards and an equip action.
AddLoadoutGroup
What it does
Displays a horizontal set of loadout items, keeps one item selected, and runs a separate equip action for that selection.
ElementFunction:AddLoadoutGroup(LoadoutConfig)
local Loadout = Builds:AddLoadoutGroup({
Name = "Defender",
Items = {
{ Name = "Health", Icon = "shield" },
{ Name = "Guard", Icon = "activity" },
{ Name = "Charge", Icon = "star" },
},
})Controller methods
| Method | Result |
|---|---|
AddItem(spec) | Appends and returns an item. |
SetItems(items) | Replaces every item. |
SetSelected(index) | Selects an existing item. |
GetSelected() | Returns the selected item and index. |
SetTitle(value) | Changes the heading. |
SetButtonText(value) | Changes the equip label. |
Equip() | Runs the equip callback for the current item. |
Compatibility aliases: AddLoadout and CreateLoadout.