So I've been trying to figure something out with this code.
I'm trying to get the equipment slot name hidden if something is equipped to that slot. For example, the "Weapon" text would be hidden if a weapon was actually equipped.
Code:
if (this._actor) {
const slotName = this.actorSlotName(this._actor, index);
const item = this.itemAt(index);
const slotNameWidth = this.slotNameWidth();
const rect = this.itemLineRect(index);
const itemWidth = rect.width - slotNameWidth;
this.changeTextColor(ColorManager.systemColor());
this.changePaintOpacity(this.isEnabled(index));
if (this._equipId == 0) {
this.drawText(slotName, rect.x, rect.y, slotNameWidth, rect.height);
} else
this.drawItemName(item, rect.x + slotNameWidth, rect.y, itemWidth);
this.changePaintOpacity(true);
}
};
I'm trying to get the equipment slot name hidden if something is equipped to that slot. For example, the "Weapon" text would be hidden if a weapon was actually equipped.