summaryrefslogtreecommitdiff
path: root/src/gui/popups
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/popups
parent072b727ae4d072d6c84f3331d78ca5a2ac76d271 (diff)
downloadmv-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.gz
mv-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.bz2
mv-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.tar.xz
mv-01a0e4b658241cc3dbd8a5d11d34a6de48dab159.zip
Add strong typed bool type Visible.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp4
-rw-r--r--src/gui/popups/createpartypopup.h4
-rw-r--r--src/gui/popups/itempopup.cpp2
-rw-r--r--src/gui/popups/popupmenu.cpp18
-rw-r--r--src/gui/popups/skillpopup.cpp2
-rw-r--r--src/gui/popups/spellpopup.cpp4
-rw-r--r--src/gui/popups/statuspopup.cpp2
-rw-r--r--src/gui/popups/textboxpopup.cpp4
-rw-r--r--src/gui/popups/textpopup.cpp4
9 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 16a60150a..167767e74 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -107,7 +107,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
{
if (!b)
{
- setVisible(false);
+ setVisible(Visible_false);
return;
}
@@ -123,7 +123,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
if (b->getType() == ActorType::Npc && b->getComment().empty())
{
- setVisible(false);
+ setVisible(Visible_false);
return;
}
diff --git a/src/gui/popups/createpartypopup.h b/src/gui/popups/createpartypopup.h
index b7f596e36..971c9a2cd 100644
--- a/src/gui/popups/createpartypopup.h
+++ b/src/gui/popups/createpartypopup.h
@@ -75,7 +75,7 @@ class CreatePartyPopup final : public Popup,
socialWindow->showPartyCreate();
}
- setVisible(false);
+ setVisible(Visible_false);
}
void show(Widget *parent)
@@ -87,7 +87,7 @@ class CreatePartyPopup final : public Popup,
parent->getAbsolutePosition(x, y);
y += parent->getHeight();
setPosition(x, y);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index ad0628afa..705c7c50f 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -278,7 +278,7 @@ void ItemPopup::mouseMoved(MouseEvent &event)
Popup::mouseMoved(event);
// When the mouse moved on top of the popup, hide it
- setVisible(false);
+ setVisible(Visible_false);
mLastName.clear();
mLastColor = 1;
mLastId = 0;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 7bf1aa5a6..dd48da369 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -939,7 +939,7 @@ void PopupMenu::showChangePos(const int x, const int y)
mType = ActorType::Unknown;
mX = 0;
mY = 0;
- setVisible(false);
+ setVisible(Visible_false);
}
}
@@ -1334,14 +1334,14 @@ void PopupMenu::handleLink(const std::string &link,
if (being == localPlayer)
{
if (equipmentWindow && !equipmentWindow->isWindowVisible())
- equipmentWindow->setVisible(true);
+ equipmentWindow->setVisible(Visible_true);
}
else
{
if (beingEquipmentWindow)
{
beingEquipmentWindow->setBeing(being);
- beingEquipmentWindow->setVisible(true);
+ beingEquipmentWindow->setVisible(Visible_true);
}
}
}
@@ -1503,22 +1503,22 @@ void PopupMenu::handleLink(const std::string &link,
else if (!link.compare(0, 12, "hide button_"))
{
if (windowMenu)
- windowMenu->showButton(link.substr(12), false);
+ windowMenu->showButton(link.substr(12), Visible_false);
}
else if (!link.compare(0, 12, "show button_"))
{
if (windowMenu)
- windowMenu->showButton(link.substr(12), true);
+ windowMenu->showButton(link.substr(12), Visible_true);
}
else if (!link.compare(0, 9, "hide bar_"))
{
if (miniStatusWindow)
- miniStatusWindow->showBar(link.substr(9), false);
+ miniStatusWindow->showBar(link.substr(9), Visible_false);
}
else if (!link.compare(0, 9, "show bar_"))
{
if (miniStatusWindow)
- miniStatusWindow->showBar(link.substr(9), true);
+ miniStatusWindow->showBar(link.substr(9), Visible_false);
}
else if (!link.compare(0, 12, "show window_"))
{
@@ -1581,7 +1581,7 @@ void PopupMenu::handleLink(const std::string &link,
logger->log("PopupMenu: Warning, unknown action '%s'", link.c_str());
}
- setVisible(false);
+ setVisible(Visible_false);
mBeingId = 0;
mFloorItemId = 0;
@@ -2234,7 +2234,7 @@ void PopupMenu::showPopup(int x, int y)
y = mainGraphics->mHeight - getHeight();
mScrollArea->setHeight(height);
setPosition(x, y);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp
index 8a6f26b26..ecd085a99 100644
--- a/src/gui/popups/skillpopup.cpp
+++ b/src/gui/popups/skillpopup.cpp
@@ -125,6 +125,6 @@ void SkillPopup::mouseMoved(MouseEvent &event)
Popup::mouseMoved(event);
// When the mouse moved on top of the popup, hide it
- setVisible(false);
+ setVisible(Visible_false);
mLastId = 0;
}
diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp
index 8e901cfb9..be741bb32 100644
--- a/src/gui/popups/spellpopup.cpp
+++ b/src/gui/popups/spellpopup.cpp
@@ -110,7 +110,7 @@ void SpellPopup::view(const int x, const int y)
}
setPosition(posX, posY);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
@@ -119,5 +119,5 @@ void SpellPopup::mouseMoved(MouseEvent &event)
Popup::mouseMoved(event);
// When the mouse moved on top of the popup, hide it
- setVisible(false);
+ setVisible(Visible_false);
}
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index 17894f04c..f69d72574 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -118,7 +118,7 @@ void StatusPopup::view(const int x, const int y)
update();
setPosition(posX, posY);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
diff --git a/src/gui/popups/textboxpopup.cpp b/src/gui/popups/textboxpopup.cpp
index 1d8d85a14..9006fe49f 100644
--- a/src/gui/popups/textboxpopup.cpp
+++ b/src/gui/popups/textboxpopup.cpp
@@ -68,7 +68,7 @@ void TextBoxPopup::show(const int x, const int y, const std::string &str)
posY = y - rect.height - distance;
setPosition(posX, posY);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
@@ -77,5 +77,5 @@ void TextBoxPopup::mouseMoved(MouseEvent &event)
Popup::mouseMoved(event);
// When the mouse moved on top of the popup, hide it
- setVisible(false);
+ setVisible(Visible_false);
}
diff --git a/src/gui/popups/textpopup.cpp b/src/gui/popups/textpopup.cpp
index 8387e394d..511816586 100644
--- a/src/gui/popups/textpopup.cpp
+++ b/src/gui/popups/textpopup.cpp
@@ -99,7 +99,7 @@ void TextPopup::show(const int x, const int y, const std::string &str1,
posY = y - rect.height - distance;
setPosition(posX, posY);
- setVisible(true);
+ setVisible(Visible_true);
requestMoveToTop();
}
@@ -108,5 +108,5 @@ void TextPopup::mouseMoved(MouseEvent &event)
Popup::mouseMoved(event);
// When the mouse moved on top of the popup, hide it
- setVisible(false);
+ setVisible(Visible_false);
}