summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.cpp6
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp6
-rw-r--r--src/gui/widgets/virtshortcutcontainer.cpp4
-rw-r--r--src/gui/windows/equipmentwindow.cpp6
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp8
-rw-r--r--src/gui/windows/tradewindow.cpp4
10 files changed, 24 insertions, 22 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 47334c407..188c8ae9a 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -2554,8 +2554,8 @@ void PopupMenu::addProtection()
void PopupMenu::addUseDrop(const Item *const item, const bool isProtected)
{
const ItemInfo &info = item->getInfo();
- const std::string &str
- = (item->isEquipment() == Equipm_true && item->isEquipped())
+ const std::string &str = (item->isEquipment() == Equipm_true
+ && item->isEquipped() == Equipped_true)
? info.getUseButton2() : info.getUseButton();
if (str.empty())
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index dfb5a94cf..0bb8c50f3 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -317,13 +317,13 @@ void ItemContainer::draw(Graphics *graphics)
{
caption = toString(item->getQuantity());
}
- else if (item->isEquipped())
+ else if (item->isEquipped() == Equipped_true)
{
// TRANSLATORS: Text under equipped items (should be small)
caption = _("Eq.");
}
- if (item->isEquipped())
+ if (item->isEquipped() == Equipped_true)
graphics->setColorAll(mEquipedColor, mEquipedColor2);
else
graphics->setColorAll(mUnEquipedColor, mUnEquipedColor2);
@@ -600,7 +600,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
item->getDamaged(),
item->getFavorite(),
Equipm_false,
- false);
+ Equipped_false);
}
return;
}
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 24dbee2aa..c11a83f8c 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -142,12 +142,12 @@ void ItemShortcutContainer::draw(Graphics *graphics)
std::string caption;
if (item->getQuantity() > 1)
caption = toString(item->getQuantity());
- else if (item->isEquipped())
- caption = "Eq.";
+ else if (item->isEquipped() == Equipped_true)
+ caption = "Eq.";
image->setAlpha(1.0F);
graphics->drawImage(image, itemX, itemY);
- if (item->isEquipped())
+ if (item->isEquipped() == Equipped_true)
{
graphics->setColorAll(mEquipedColor, mEquipedColor2);
}
diff --git a/src/gui/widgets/virtshortcutcontainer.cpp b/src/gui/widgets/virtshortcutcontainer.cpp
index 75e3391c7..b735f962e 100644
--- a/src/gui/widgets/virtshortcutcontainer.cpp
+++ b/src/gui/widgets/virtshortcutcontainer.cpp
@@ -117,12 +117,12 @@ void VirtShortcutContainer::draw(Graphics *graphics)
std::string caption;
if (item->getQuantity() > 1)
caption = toString(item->getQuantity());
- else if (item->isEquipped())
+ else if (item->isEquipped() == Equipped_true)
caption = "Eq.";
image->setAlpha(1.0F);
graphics->drawImage(image, itemX, itemY);
- if (item->isEquipped())
+ if (item->isEquipped() == Equipped_true)
graphics->setColorAll(mEquipedColor, mEquipedColor2);
else
graphics->setColorAll(mUnEquipedColor, mUnEquipedColor2);
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 74bcaaafb..f26a877cf 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -324,7 +324,7 @@ void EquipmentWindow::action(const ActionEvent &event)
{
if (item->isEquipment() == Equipm_true)
{
- if (!item->isEquipped())
+ if (item->isEquipped() == Equipped_false)
PlayerInfo::equipItem(item, true);
}
}
@@ -468,7 +468,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
{
if (item->isEquipment() == Equipm_true)
{
- if (!item->isEquipped())
+ if (item->isEquipped() == Equipped_false)
PlayerInfo::equipItem(item, true);
}
}
@@ -492,7 +492,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
return;
}
- if (item->isEquipped())
+ if (item->isEquipped() == Equipped_true)
PlayerInfo::unequipItem(item, true);
}
}
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index b788039a9..0124152ee 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -741,8 +741,8 @@ void InventoryWindow::updateButtons(const Item *item)
if (mUseButton)
{
const ItemInfo &info = item->getInfo();
- const std::string &str
- = (item->isEquipment() == Equipm_true && item->isEquipped())
+ const std::string &str = (item->isEquipment() == Equipm_true
+ && item->isEquipped() == Equipped_true)
? info.getUseButton2() : info.getUseButton();
if (str.empty())
{
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 6ffd857bc..1369a0686 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -339,7 +339,7 @@ void ItemAmountWindow::action(const ActionEvent &event)
Damaged_true,
Favorite_false,
Equipm_false,
- false);
+ Equipped_false);
if (mUsage == ShopBuyAdd)
mMax = 10000;
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 9c93b7474..096ab1c39 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -479,7 +479,7 @@ void NpcDialog::action(const ActionEvent &event)
item->getDamaged(),
item->getFavorite(),
Equipm_false,
- false);
+ Equipped_false);
}
}
}
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index d73f86a05..3a0f26d64 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -281,7 +281,9 @@ void OutfitWindow::wearOutfit(const int outfit, const bool unwearEmpty,
{
const Item *const item = PlayerInfo::getInventory()->findItem(
mItems[outfit][i], mItemColors[outfit][i]);
- if (item && !item->isEquipped() && item->getQuantity())
+ if (item
+ && item->isEquipped() == Equipped_false
+ && item->getQuantity())
{
if (item->isEquipment() == Equipm_true)
{
@@ -516,7 +518,7 @@ void OutfitWindow::unequipNotInOutfit(const int outfit) const
for (unsigned i = 0; i < invSize; i++)
{
const Item *const item = inventory->getItem(i);
- if (item && item->isEquipped())
+ if (item && item->isEquipped() == Equipped_true)
{
bool found = false;
for (unsigned f = 0; f < OUTFIT_ITEM_COUNT; f++)
@@ -632,7 +634,7 @@ void OutfitWindow::copyFromEquiped(const int dst)
for (unsigned i = 0, sz = inventory->getSize(); i < sz; i++)
{
const Item *const item = inventory->getItem(i);
- if (item && item->isEquipped())
+ if (item && item->isEquipped() == Equipped_true)
{
mItems[dst][outfitCell] = item->getId();
mItemColors[dst][outfitCell++] = item->getColor();
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 1dc1a9882..ef2897ccd 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -214,7 +214,7 @@ void TradeWindow::addItem(const int id,
damaged,
favorite,
Equipm_false,
- false);
+ Equipped_false);
}
void TradeWindow::addItem2(const int id,
@@ -240,7 +240,7 @@ void TradeWindow::addItem2(const int id,
damaged,
favorite,
equipment,
- false);
+ Equipped_false);
if (slot >= 0)
inv->setCards(slot, cards, sz);
}