summaryrefslogtreecommitdiff
path: root/src/gui/windows/equipmentwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-28 00:55:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-28 00:55:13 +0300
commit01a0e4b658241cc3dbd8a5d11d34a6de48dab159 (patch)
tree37294c079b9a05768b7380f7595784eb73485769 /src/gui/windows/equipmentwindow.cpp
parent072b727ae4d072d6c84f3331d78ca5a2ac76d271 (diff)
downloadmanaplus-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.gz
manaplus-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.bz2
manaplus-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.xz
manaplus-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.zip
Add strong typed bool type Visible.
Diffstat (limited to 'src/gui/windows/equipmentwindow.cpp')
-rw-r--r--src/gui/windows/equipmentwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index d569c3cc2..a847c3fff 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -389,9 +389,9 @@ void EquipmentWindow::action(const ActionEvent &event)
void EquipmentWindow::updatePage()
{
EquipmentPage *const page = mPages[mSelectedTab];
- const bool visible = page->showPlayerBox;
+ const Visible visible = fromBool(page->showPlayerBox, Visible);
mPlayerBox->setVisible(visible);
- if (visible)
+ if (visible == Visible_true)
{
mPlayerBox->setDimension(Rect(page->x, page->y,
page->width, page->height));
@@ -474,7 +474,7 @@ void EquipmentWindow::mousePressed(MouseEvent& event)
if (Item *const item = getItem(x, y))
{
if (itemPopup)
- itemPopup->setVisible(false);
+ itemPopup->setVisible(Visible_false);
/* Convert relative to the window coordinates to absolute screen
* coordinates.
@@ -575,7 +575,7 @@ void EquipmentWindow::mouseMoved(MouseEvent &event)
}
else
{
- itemPopup->setVisible(false);
+ itemPopup->setVisible(Visible_false);
}
}
@@ -583,7 +583,7 @@ void EquipmentWindow::mouseMoved(MouseEvent &event)
void EquipmentWindow::mouseExited(MouseEvent &event A_UNUSED)
{
if (itemPopup)
- itemPopup->setVisible(false);
+ itemPopup->setVisible(Visible_false);
}
void EquipmentWindow::setSelected(const int index)
@@ -593,7 +593,7 @@ void EquipmentWindow::setSelected(const int index)
if (mUnequip)
mUnequip->setEnabled(mSelected != -1);
if (itemPopup)
- itemPopup->setVisible(false);
+ itemPopup->setVisible(Visible_false);
}
void EquipmentWindow::setBeing(Being *const being)