ShopItem::ShopItem(const int id, const int type, const ItemColor color, const int price) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, Favorite_false, Equipm_false, Equipped_false), mDisplayName(), mDuplicates(), mPrice(price), mShowQuantity(false), mVisible(true) { updateDisplayName(0); setInvIndex(-1); addDuplicate(-1, 0); }
ShopItem::ShopItem(const int inventoryIndex, const int id, const int type, const unsigned char color, const int quantity, const int price) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, Favorite_false, Equipm_false, Equipped_false), mDisplayName(), mDuplicates(), mPrice(price), mShowQuantity(true), mVisible(true) { updateDisplayName(quantity); setInvIndex(inventoryIndex); addDuplicate(inventoryIndex, quantity); }
void CtrlDX::publishValue(float value) { Ctrl::publishValue(value / steps); updateDisplayName(); }
void Ctrl::mouseEnter(const juce::MouseEvent &event) { updateDisplayName(); }
void ShopItem::update() { if (mShowQuantity) updateDisplayName(mQuantity); }