diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-04 22:08:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-04 22:08:04 +0300 |
commit | a865b10749df829ef46a14e244bc88ac52bc10b4 (patch) | |
tree | 244f283ab8ba6cfcc9683eafe51be7a9d7bbabbe /src/gui/widgets | |
parent | 9b3e13d4246930f0aa4dfb86e735466032d283dd (diff) | |
download | manaverse-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.gz manaverse-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.bz2 manaverse-a865b10749df829ef46a14e244bc88ac52bc10b4.tar.xz manaverse-a865b10749df829ef46a14e244bc88ac52bc10b4.zip |
Add colors support for drops panel.
Delete search item function without colors support.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 15 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 2 |
2 files changed, 11 insertions, 6 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) { diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 1650c386e..a9d1f5279 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -342,7 +342,7 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event) itemShortcut[num]->setItemSelected(item); } if (dropShortcut) - dropShortcut->setItemSelected(item->getId()); + dropShortcut->setItemSelected(item); if (item->isEquipment() && outfitWindow) outfitWindow->setItemSelected(item); if (shopWindow) |