Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed Dec 7, 2023
1 parent ee07f59 commit bd94134
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/core/components/main/buttons/itemButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class ItemButton extends ArgonComponent{
this._isPrimary = isPrimary;
this._inActionPanel = inActionPanel ?? isWeaponSet;
if (this.isWeaponSet) this.hookId = Hooks.on("argon-onSetChangeUpdateItem", this._onSetChange.bind(this));
ui.ARGON.itemButtons.push(this);
ui.ARGON.addItemButtons(this);
}

get classes() {
Expand Down
5 changes: 5 additions & 0 deletions scripts/core/hud.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ export class CoreHUD extends Application{
return Array.from(this._itemButtons);
}

addItemButtons(buttons) {
if (!Array.isArray(buttons)) buttons = [buttons];
this._itemButtons.add(...buttons);
}

get accordionPanelCategories() {
return Array.from(this._accordionPanelCategories);
}
Expand Down

0 comments on commit bd94134

Please sign in to comment.