diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-14 09:33:48 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-14 09:33:48 -0600 |
commit | 698e166377fa4e7e4e4a971af33458c68bd70809 (patch) | |
tree | 445020bd2cfd7812a6583f3080de0ca6a05d4117 /src/gui/itemcontainer.cpp | |
parent | a1b399ad3956b03ce26416abd906f22e3c3d2d82 (diff) | |
download | mana-698e166377fa4e7e4e4a971af33458c68bd70809.tar.gz mana-698e166377fa4e7e4e4a971af33458c68bd70809.tar.bz2 mana-698e166377fa4e7e4e4a971af33458c68bd70809.tar.xz mana-698e166377fa4e7e4e4a971af33458c68bd70809.zip |
Commented up item popups, speech bubbles, as well as only update item
info on item change. Also fixed color updating for item shortcuts and
item links, as the displayed colors wouldn't update on change on color
change in the setup color dialog.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 54f1f647..8139e85e 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -25,6 +25,7 @@ #include "itemcontainer.h" #include "itempopup.h" +#include "palette.h" #include "viewport.h" #include "../graphics.h" @@ -51,6 +52,7 @@ ItemContainer::ItemContainer(Inventory *inventory, int offset): mOffset(offset) { mItemPopup = new ItemPopup(); + mItemPopup->setOpaque(false); ResourceManager *resman = ResourceManager::getInstance(); @@ -123,7 +125,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) // Draw item caption graphics->setFont(getFont()); - graphics->setColor(0x000000); + graphics->setColor(guiPalette->getColor(Palette::TEXT)); graphics->drawText( (item->isEquipped() ? "Eq." : toString(item->getQuantity())), itemX + gridWidth / 2, itemY + gridHeight - 11, @@ -255,8 +257,9 @@ void ItemContainer::mouseMoved(gcn::MouseEvent &event) if (item) { - mItemPopup->setItem(item->getInfo()); - mItemPopup->setOpaque(false); + if (item->getInfo().getName() != mItemPopup->getItemName()) + mItemPopup->setItem(item->getInfo()); + mItemPopup->updateColors(); mItemPopup->view(viewport->getMouseX(), viewport->getMouseY()); } else |