diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-01 14:08:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-01 14:08:03 +0300 |
commit | c65c2a8130c7748a2b8eee03ff716bd9db699d79 (patch) | |
tree | 6321e3e8fe7f6bee7723422d3b59732ef865f809 /src/dragdrop.h | |
parent | 14b6bc262cb761f7949f0d39606cb1b562d68cc7 (diff) | |
download | plus-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.h | 11 |
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; }; |