summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 21:16:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 21:16:07 +0300
commit0c063cf5b45a843485fe3343e5fb79a40141f88c (patch)
treee2419701a312e0ba97404049cd5b82b7420c3fce /src/gui/windows
parentdb82bf99bbd6d246f3e8da19fe88705f7015f144 (diff)
downloadmanaplus-0c063cf5b45a843485fe3343e5fb79a40141f88c.tar.gz
manaplus-0c063cf5b45a843485fe3343e5fb79a40141f88c.tar.bz2
manaplus-0c063cf5b45a843485fe3343e5fb79a40141f88c.tar.xz
manaplus-0c063cf5b45a843485fe3343e5fb79a40141f88c.zip
Convert DragDropSource enum into strong typed enum.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/equipmentwindow.cpp16
-rw-r--r--src/gui/windows/outfitwindow.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 53097802a..4bd285b8f 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -359,8 +359,8 @@ void EquipmentWindow::action(const ActionEvent &event)
else if (eventId == "playerbox")
{
const DragDropSource src = dragDrop.getSource();
- if (dragDrop.isEmpty() || (src != DRAGDROP_SOURCE_INVENTORY
- && src != DRAGDROP_SOURCE_EQUIPMENT))
+ if (dragDrop.isEmpty() || (src != DragDropSource::Inventory
+ && src != DragDropSource::Equipment))
{
return;
}
@@ -373,7 +373,7 @@ void EquipmentWindow::action(const ActionEvent &event)
if (!item)
return;
- if (dragDrop.getSource() == DRAGDROP_SOURCE_INVENTORY)
+ if (dragDrop.getSource() == DragDropSource::Inventory)
{
if (item->isEquipment() == Equipm_true)
{
@@ -459,7 +459,7 @@ void EquipmentWindow::mousePressed(MouseEvent& event)
{
event.consume();
setSelected(i);
- dragDrop.dragItem(item, DRAGDROP_SOURCE_EQUIPMENT);
+ dragDrop.dragItem(item, DragDropSource::Equipment);
return;
}
}
@@ -502,8 +502,8 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
{
Window::mouseReleased(event);
const DragDropSource src = dragDrop.getSource();
- if (dragDrop.isEmpty() || (src != DRAGDROP_SOURCE_INVENTORY
- && src != DRAGDROP_SOURCE_EQUIPMENT))
+ if (dragDrop.isEmpty() || (src != DragDropSource::Inventory
+ && src != DragDropSource::Equipment))
{
return;
}
@@ -517,7 +517,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
if (!item)
return;
- if (dragDrop.getSource() == DRAGDROP_SOURCE_INVENTORY)
+ if (dragDrop.getSource() == DragDropSource::Inventory)
{
if (item->isEquipment() == Equipm_true)
{
@@ -525,7 +525,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
PlayerInfo::equipItem(item, Sfx_true);
}
}
- else if (dragDrop.getSource() == DRAGDROP_SOURCE_EQUIPMENT)
+ else if (dragDrop.getSource() == DragDropSource::Equipment)
{
if (item->isEquipment() == Equipm_true)
{
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 7ce43333b..1cf89cb42 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -467,7 +467,7 @@ void OutfitWindow::mouseDragged(MouseEvent &event)
{
Item *const item = inv->findItem(itemId, itemColor);
if (item)
- dragDrop.dragItem(item, DRAGDROP_SOURCE_OUTFIT);
+ dragDrop.dragItem(item, DragDropSource::Outfit);
else
dragDrop.clear();
mItems[mCurrentOutfit][index] = -1;