summaryrefslogtreecommitdiff
path: root/src/dragdrop.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-01 14:08:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-01 14:08:03 +0300
commitc65c2a8130c7748a2b8eee03ff716bd9db699d79 (patch)
tree6321e3e8fe7f6bee7723422d3b59732ef865f809 /src/dragdrop.h
parent14b6bc262cb761f7949f0d39606cb1b562d68cc7 (diff)
downloadplus-c65c2a8130c7748a2b8eee03ff716bd9db699d79.tar.gz
plus-c65c2a8130c7748a2b8eee03ff716bd9db699d79.tar.bz2
plus-c65c2a8130c7748a2b8eee03ff716bd9db699d79.tar.xz
plus-c65c2a8130c7748a2b8eee03ff716bd9db699d79.zip
Restore adding items to outfits and drops by clicking only.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r--src/dragdrop.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h
index 37f1b6ee5..5630f9248 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -45,6 +45,7 @@ class DragDrop
public:
DragDrop(Item *const item, const DragDropSource source) :
mItem(item),
+ mSelItem(nullptr),
mSource(source)
{
}
@@ -70,8 +71,18 @@ class DragDrop
bool isEmpty() const
{ return mSource == DRAGDROP_SOURCE_EMPTY; }
+ void select(Item *const item)
+ { mSelItem = item; }
+
+ void deselect()
+ { mSelItem = nullptr; }
+
+ Item *getSelected()
+ { return mSelItem; }
+
private:
Item *mItem;
+ Item *mSelItem;
DragDropSource mSource;
};