diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
commit | de51eaa43e05c2126fc1eef2a7e115843f972547 (patch) | |
tree | 286a05a069e048247f90c7595f1b8939be784608 /src/gui | |
parent | d4c08d3bf69410a35a50875de50cc6fe74b3bf3e (diff) | |
parent | 8627c7745f47492ab349da6a74e98e3d5813418f (diff) | |
download | plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.gz plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.bz2 plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.xz plus-de51eaa43e05c2126fc1eef2a7e115843f972547.zip |
Merge branch 'coloritems'
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 8 | ||||
-rw-r--r-- | src/gui/outfitwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/trade.cpp | 13 | ||||
-rw-r--r-- | src/gui/trade.h | 7 |
4 files changed, 17 insertions, 14 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index dff591dd9..ae4401572 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -58,7 +58,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mPlayer = new Being(0, ActorSprite::PLAYER, 0, NULL); mPlayer->setGender(GENDER_MALE); - int numberOfHairColors = ColorDB::size(); + int numberOfHairColors = ColorDB::getHairSize(); mHairStyle = rand() % mPlayer->getNumOfHairstyles(); mHairColor = rand() % numberOfHairColors; @@ -364,10 +364,10 @@ void CharCreateDialog::updateHair() if (mHairStyle < 0) mHairStyle += Being::getNumOfHairstyles(); - mHairColor %= ColorDB::size(); + mHairColor %= ColorDB::getHairSize(); if (mHairColor < 0) - mHairColor += ColorDB::size(); + mHairColor += ColorDB::getHairSize(); mPlayer->setSprite(Net::getCharHandler()->hairSprite(), - mHairStyle * -1, ColorDB::get(mHairColor)); + mHairStyle * -1, ColorDB::getHairColor(mHairColor)); } diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index 2796e13c8..ea2b7980c 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -292,7 +292,8 @@ void OutfitWindow::draw(gcn::Graphics *graphics) } if (!foundItem) { - Image *image = Item::getImage(mItems[mCurrentOutfit][i]); + //+++ need use colors in outfits + Image *image = Item::getImage(mItems[mCurrentOutfit][i], 1); if (image) g->drawImage(image, itemX, itemY); } diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index f7b16d6ae..be4891103 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -151,21 +151,22 @@ void TradeWindow::setMoney(int amount) mMoneyLabel->adjustSize(); } -void TradeWindow::addItem(int id, bool own, int quantity, int refine) +void TradeWindow::addItem(int id, bool own, int quantity, + int refine, unsigned char color) { if (own) - mMyInventory->addItem(id, quantity, refine); + mMyInventory->addItem(id, quantity, refine, color); else - mPartnerInventory->addItem(id, quantity, refine); + mPartnerInventory->addItem(id, quantity, refine, color); } void TradeWindow::addItem(int id, bool own, int quantity, - int refine, bool equipment) + int refine, unsigned char color, bool equipment) { if (own) - mMyInventory->addItem(id, quantity, refine, equipment); + mMyInventory->addItem(id, quantity, refine, color, equipment); else - mPartnerInventory->addItem(id, quantity, refine, equipment); + mPartnerInventory->addItem(id, quantity, refine, color, equipment); } void TradeWindow::changeQuantity(int index, bool own, int quantity) diff --git a/src/gui/trade.h b/src/gui/trade.h index c316e2354..fcaa2f6ac 100644 --- a/src/gui/trade.h +++ b/src/gui/trade.h @@ -63,7 +63,8 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener /** * Add an item to the trade window. */ - void addItem(int id, bool own, int quantity, int refine); + void addItem(int id, bool own, int quantity, + int refine, unsigned char color); /** * Reset both item containers @@ -73,8 +74,8 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener /** * Add an item to the trade window. */ - void addItem(int id, bool own, int quantity, - int refine, bool equipment); + void addItem(int id, bool own, int quantity, int refine, + unsigned char color, bool equipment); /** * Change quantity of an item. |