summaryrefslogtreecommitdiff
path: root/src/dragdrop.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-03 15:48:02 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-03 15:48:02 +0300
commit2eb15d389f85e300cb124b990ebbf2663acaa637 (patch)
tree1016d973c9ca54b262b828daf462f07505c7fd4c /src/dragdrop.h
parent9e4161f7324331498630fb25e72ff6d08c2db76f (diff)
downloadManaVerse-2eb15d389f85e300cb124b990ebbf2663acaa637.tar.gz
ManaVerse-2eb15d389f85e300cb124b990ebbf2663acaa637.tar.bz2
ManaVerse-2eb15d389f85e300cb124b990ebbf2663acaa637.tar.xz
ManaVerse-2eb15d389f85e300cb124b990ebbf2663acaa637.zip
add support for drag and drop from/to shortcuts window.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r--src/dragdrop.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h
index 2405b151e..3c7167aaf 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -83,7 +83,7 @@ class DragDrop
DragDropSource getSource() const
{ return mSource; }
- void dragItem(Item *const item,
+ void dragItem(const Item *const item,
const DragDropSource source,
const int tag = 0)
{
@@ -111,7 +111,7 @@ class DragDrop
}
}
- void dragCommand(TextCommand *const command,
+ void dragCommand(const TextCommand *const command,
const DragDropSource source,
const int tag = 0)
{
@@ -134,6 +134,7 @@ class DragDrop
mTag = 0;
return;
}
+ mItem = command->getId();
}
else
{
@@ -165,6 +166,7 @@ class DragDrop
mItemImage = data->icon;
if (mItemImage)
mItemImage->incRef();
+ mItem = info->id;
mSource = source;
mTag = tag;
}
@@ -224,6 +226,9 @@ class DragDrop
int getTag()
{ return mTag; }
+ void setItem(const int item)
+ { mItem = item; }
+
private:
int mItem;
uint8_t mItemColor;