diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-04 21:30:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-04 21:30:42 +0300 |
commit | 9b3e13d4246930f0aa4dfb86e735466032d283dd (patch) | |
tree | b7f5676c5617a7a971a68ecbdf3b4cdc4f74b557 | |
parent | 3dd4d34239a00a71df3638d148bfe92047ac7921 (diff) | |
download | manaverse-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.gz manaverse-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.bz2 manaverse-9b3e13d4246930f0aa4dfb86e735466032d283dd.tar.xz manaverse-9b3e13d4246930f0aa4dfb86e735466032d283dd.zip |
Fix colors support in shortcuts panel
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 6 |
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), |