summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-04 21:30:42 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-04 21:30:42 +0300
commit9b3e13d4246930f0aa4dfb86e735466032d283dd (patch)
treeb7f5676c5617a7a971a68ecbdf3b4cdc4f74b557 /src/gui/widgets
parent3dd4d34239a00a71df3638d148bfe92047ac7921 (diff)
downloadmanaplus-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.gz
manaplus-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.bz2
manaplus-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.xz
manaplus-9b3e13d4246930f0aa4dfb86e735466032d283dd.zip
Fix colors support in shortcuts panel
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 362cfad54..b33c7ee26 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -222,6 +222,7 @@ void ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event)
return;
const int itemId = itemShortcut[mNumber]->getItem(index);
+ const int itemColor = itemShortcut[mNumber]->getItemColor(index);
if (itemId < 0)
return;
@@ -231,7 +232,8 @@ void ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event)
if (!PlayerInfo::getInventory())
return;
- Item *item = PlayerInfo::getInventory()->findItem(itemId);
+ Item *item = PlayerInfo::getInventory()->findItem(
+ itemId, itemColor);
if (item)
{
@@ -283,8 +285,6 @@ void ItemShortcutContainer::mousePressed(gcn::MouseEvent &event)
}
else if (event.getButton() == gcn::MouseEvent::RIGHT)
{
-// Item *item = PlayerInfo::getInventory()->findItem(id);
-
if (viewport && itemShortcut[mNumber])
{
viewport->showItemPopup(itemShortcut[mNumber]->getItem(index),