From c65c2a8130c7748a2b8eee03ff716bd9db699d79 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Jun 2013 14:08:03 +0300 Subject: Restore adding items to outfits and drops by clicking only. --- src/dragdrop.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/dragdrop.h') 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; }; -- cgit v1.2.3-60-g2f50