summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-04 22:08:04 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-04 22:08:04 +0300
commita865b10749df829ef46a14e244bc88ac52bc10b4 (patch)
tree244f283ab8ba6cfcc9683eafe51be7a9d7bbabbe /src/gui/widgets/dropshortcutcontainer.cpp
parent9b3e13d4246930f0aa4dfb86e735466032d283dd (diff)
downloadmanaplus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.gz
manaplus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.bz2
manaplus-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.xz
manaplus-a865b10749df829ef46a14e244bc88ac52bc10b4.zip
Add colors support for drops panel.
Delete search item function without colors support.
Diffstat (limited to 'src/gui/widgets/dropshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 0125558dc..224830d8f 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -119,7 +119,8 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics)
if (!inv)
return;
- Item *item = inv->findItem(dropShortcut->getItem(i));
+ Item *item = inv->findItem(dropShortcut->getItem(i),
+ dropShortcut->getItemColor(i));
if (item)
{
@@ -178,6 +179,7 @@ void DropShortcutContainer::mouseDragged(gcn::MouseEvent &event)
return;
const int itemId = dropShortcut->getItem(index);
+ const int itemColor = dropShortcut->getItemColor(index);
if (itemId < 0)
return;
@@ -186,7 +188,7 @@ void DropShortcutContainer::mouseDragged(gcn::MouseEvent &event)
if (!inv)
return;
- Item *item = inv->findItem(itemId);
+ Item *item = inv->findItem(itemId, itemColor);
if (item)
{
@@ -231,7 +233,8 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event)
if (!inv)
return;
- Item *item = inv->findItem(dropShortcut->getItem(index));
+ Item *item = inv->findItem(dropShortcut->getItem(index),
+ dropShortcut->getItemColor(index));
if (viewport)
viewport->showDropPopup(item);
@@ -256,7 +259,8 @@ void DropShortcutContainer::mouseReleased(gcn::MouseEvent &event)
}
if (mItemMoved)
{
- dropShortcut->setItems(index, mItemMoved->getId());
+ dropShortcut->setItems(index, mItemMoved->getId(),
+ mItemMoved->getColor());
mItemMoved = NULL;
}
@@ -277,6 +281,7 @@ void DropShortcutContainer::mouseMoved(gcn::MouseEvent &event)
return;
const int itemId = dropShortcut->getItem(index);
+ const int itemColor = dropShortcut->getItemColor(index);
if (itemId < 0)
return;
@@ -285,7 +290,7 @@ void DropShortcutContainer::mouseMoved(gcn::MouseEvent &event)
if (!inv)
return;
- Item *item = inv->findItem(itemId);
+ Item *item = inv->findItem(itemId, itemColor);
if (item && viewport)
{