From d6b7cd3b259512cd28e1b5a82861ef8b11b2b7cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 24 Jan 2015 16:05:23 +0300 Subject: Use InventoryType for inventory type. --- src/gui/popups/popupmenu.cpp | 2 +- src/gui/popups/popupmenu.h | 4 +++- src/gui/windows/equipmentwindow.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index af207dffe..6e7b94e44 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1612,7 +1612,7 @@ void PopupMenu::handleLink(const std::string &link, void PopupMenu::showPopup(Window *const parent, const int x, const int y, Item *const item, - const int type) + const InventoryType::Type type) { if (!item) return; diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index 5b959cdaa..0274d69a4 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -23,6 +23,8 @@ #ifndef GUI_POPUPS_POPUPMENU_H #define GUI_POPUPS_POPUPMENU_H +#include "enums/inventorytype.h" + #include "gui/widgets/linkhandler.h" #include "gui/widgets/popup.h" @@ -89,7 +91,7 @@ class PopupMenu final : public Popup, public LinkHandler void showPopup(Window *const parent, const int x, const int y, Item *const item, - const int type); + const InventoryType::Type type); void showPopup(const int x, const int y, Button *const button); diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index ae438dc10..6bec6dfa3 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -430,9 +430,14 @@ void EquipmentWindow::mousePressed(MouseEvent& event) { event.consume(); if (mForing) + { popupMenu->showUndressPopup(mx, my, mBeing, item); + } else - popupMenu->showPopup(this, mx, my, item, true); + { + popupMenu->showPopup(this, mx, my, item, + InventoryType::INVENTORY); + } return; } } -- cgit v1.2.3-70-g09d2