summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-19 16:02:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-19 16:02:28 +0300
commitab165fef49f68f53e8baea8d7d71f73f81e9d2c5 (patch)
tree3e83aafd8784a4f6b4284b3cf3f3d399a2c0dd26 /src/gui/windows/inventorywindow.cpp
parentbaa7e75fe372e156704f08ae98368cc6408447ff (diff)
downloadplus-ab165fef49f68f53e8baea8d7d71f73f81e9d2c5.tar.gz
plus-ab165fef49f68f53e8baea8d7d71f73f81e9d2c5.tar.bz2
plus-ab165fef49f68f53e8baea8d7d71f73f81e9d2c5.tar.xz
plus-ab165fef49f68f53e8baea8d7d71f73f81e9d2c5.zip
In inventory and help window use actions to open another windows.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 53e847af0..3865647e0 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -311,30 +311,15 @@ void InventoryWindow::action(const ActionEvent &event)
const std::string &eventId = event.getId();
if (eventId == "outfit")
{
- if (outfitWindow)
- {
- outfitWindow->setVisible(!outfitWindow->isWindowVisible());
- if (outfitWindow->isWindowVisible())
- outfitWindow->requestMoveToTop();
- }
+ inputManager.executeAction(InputAction::WINDOW_OUTFIT);
}
else if (eventId == "shop")
{
- if (shopWindow)
- {
- shopWindow->setVisible(!shopWindow->isWindowVisible());
- if (shopWindow->isWindowVisible())
- shopWindow->requestMoveToTop();
- }
+ inputManager.executeAction(InputAction::WINDOW_SHOP);
}
else if (eventId == "equipment")
{
- if (equipmentWindow)
- {
- equipmentWindow->setVisible(!equipmentWindow->isWindowVisible());
- if (equipmentWindow->isWindowVisible())
- equipmentWindow->requestMoveToTop();
- }
+ inputManager.executeAction(InputAction::WINDOW_EQUIPMENT);
}
else if (eventId == "close")
{