Beispiel #1
0
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);
}
Beispiel #2
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);
}
Beispiel #3
0
void CtrlDX::publishValue(float value) {
    Ctrl::publishValue(value / steps);
    updateDisplayName();
}
Beispiel #4
0
void Ctrl::mouseEnter(const juce::MouseEvent &event) {
    updateDisplayName();
}
Beispiel #5
0
void ShopItem::update()
{
    if (mShowQuantity)
        updateDisplayName(mQuantity);
}