summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-09 18:17:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-09 18:17:50 +0300
commit4aeceabb5d4f00e2555234951a2f5db24b008265 (patch)
tree16e970611e7cc05352f18a9385b9e26c72d498d8 /src/gui/inventorywindow.cpp
parentdd4d44a07d3a63ced0eec51c30b75887792c4a36 (diff)
downloadmv-4aeceabb5d4f00e2555234951a2f5db24b008265.tar.gz
mv-4aeceabb5d4f00e2555234951a2f5db24b008265.tar.bz2
mv-4aeceabb5d4f00e2555234951a2f5db24b008265.tar.xz
mv-4aeceabb5d4f00e2555234951a2f5db24b008265.zip
Improve perfomance in windows and popups visibility checks.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 22fea71c7..dfbe8b8b8 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -262,8 +262,8 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
{
if (outfitWindow)
{
- outfitWindow->setVisible(!outfitWindow->isVisible());
- if (outfitWindow->isVisible())
+ outfitWindow->setVisible(!outfitWindow->isWindowVisible());
+ if (outfitWindow->isWindowVisible())
outfitWindow->requestMoveToTop();
}
}
@@ -271,8 +271,8 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
{
if (shopWindow)
{
- shopWindow->setVisible(!shopWindow->isVisible());
- if (shopWindow->isVisible())
+ shopWindow->setVisible(!shopWindow->isWindowVisible());
+ if (shopWindow->isWindowVisible())
shopWindow->requestMoveToTop();
}
}
@@ -280,8 +280,8 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
{
if (equipmentWindow)
{
- equipmentWindow->setVisible(!equipmentWindow->isVisible());
- if (equipmentWindow->isVisible())
+ equipmentWindow->setVisible(!equipmentWindow->isWindowVisible());
+ if (equipmentWindow->isWindowVisible())
equipmentWindow->requestMoveToTop();
}
}
@@ -291,7 +291,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
}
else if (eventId == "store")
{
- if (!inventoryWindow || !inventoryWindow->isVisible())
+ if (!inventoryWindow || !inventoryWindow->isWindowVisible())
return;
Item *const item = inventoryWindow->getSelectedItem();
@@ -413,7 +413,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
const bool mod = (isStorageActive() && inputManager.isActionActive(
static_cast<int>(Input::KEY_MOD)));
- const bool mod2 = (tradeWindow && tradeWindow->isVisible()
+ const bool mod2 = (tradeWindow && tradeWindow->isWindowVisible()
&& inputManager.isActionActive(static_cast<int>(Input::KEY_MOD)));
if (!mod && !mod2 && event.getButton() == gcn::MouseEvent::RIGHT)
@@ -497,7 +497,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
ItemAmountWindow::showWindow(ItemAmountWindow::StoreAdd,
inventoryWindow, item);
}
- else if (tradeWindow && tradeWindow->isVisible())
+ else if (tradeWindow && tradeWindow->isWindowVisible())
{
ItemAmountWindow::showWindow(ItemAmountWindow::TradeAdd,
tradeWindow, item);