summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-12 06:44:16 -0600
committerIra Rice <irarice@gmail.com>2009-03-12 08:38:07 -0600
commit37b812f2892a9b11a88abcbcde0b47aca76f4a71 (patch)
tree6872d9c5420845c50c1ea411c0f999aeb8ffc434 /src/gui
parent5b1e2aae6391edc99425ed7671d59eddd774212e (diff)
downloadmana-37b812f2892a9b11a88abcbcde0b47aca76f4a71.tar.gz
mana-37b812f2892a9b11a88abcbcde0b47aca76f4a71.tar.bz2
mana-37b812f2892a9b11a88abcbcde0b47aca76f4a71.tar.xz
mana-37b812f2892a9b11a88abcbcde0b47aca76f4a71.zip
Move emote sprite loading into EmoteDB
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/emotecontainer.cpp2
-rw-r--r--src/gui/emotecontainer.h2
-rw-r--r--src/gui/emoteshortcutcontainer.cpp4
-rw-r--r--src/gui/emoteshortcutcontainer.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp
index 9764ab9c..22b4cf50 100644
--- a/src/gui/emotecontainer.cpp
+++ b/src/gui/emotecontainer.cpp
@@ -54,7 +54,7 @@ EmoteContainer::EmoteContainer():
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
- mEmoteImg.push_back(player_node->getEmote(i));
+ mEmoteImg.push_back(EmoteDB::getAnimation(i));
}
mSelImg = resman->getImage("graphics/gui/selection.png");
diff --git a/src/gui/emotecontainer.h b/src/gui/emotecontainer.h
index 260f1754..7e88cb71 100644
--- a/src/gui/emotecontainer.h
+++ b/src/gui/emotecontainer.h
@@ -122,7 +122,7 @@ class EmoteContainer : public gcn::Widget,
*/
void distributeValueChangedEvent(void);
- std::vector<AnimatedSprite*> mEmoteImg;
+ std::vector<const AnimatedSprite*> mEmoteImg;
Image *mSelImg;
int mSelectedEmoteIndex;
diff --git a/src/gui/emoteshortcutcontainer.cpp b/src/gui/emoteshortcutcontainer.cpp
index f4cef106..8c9df14e 100644
--- a/src/gui/emoteshortcutcontainer.cpp
+++ b/src/gui/emoteshortcutcontainer.cpp
@@ -60,7 +60,7 @@ EmoteShortcutContainer::EmoteShortcutContainer():
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
- mEmoteImg.push_back(player_node->getEmote(i));
+ mEmoteImg.push_back(EmoteDB::getAnimation(i));
}
mMaxItems = EmoteDB::getLast() < MAX_ITEMS ? EmoteDB::getLast() : MAX_ITEMS;
@@ -113,7 +113,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
if (mEmoteMoved)
{
// Draw the emote image being dragged by the cursor.
- AnimatedSprite* sprite = mEmoteImg[mEmoteMoved - 1];
+ const AnimatedSprite* sprite = mEmoteImg[mEmoteMoved - 1];
if (sprite)
{
const int tPosX = mCursorPosX - (sprite->getWidth() / 2);
diff --git a/src/gui/emoteshortcutcontainer.h b/src/gui/emoteshortcutcontainer.h
index 4c4b3614..ff9f929c 100644
--- a/src/gui/emoteshortcutcontainer.h
+++ b/src/gui/emoteshortcutcontainer.h
@@ -69,7 +69,7 @@ class EmoteShortcutContainer : public ShortcutContainer
void mouseReleased(gcn::MouseEvent &event);
private:
- std::vector<AnimatedSprite*> mEmoteImg;
+ std::vector<const AnimatedSprite*> mEmoteImg;
bool mEmoteClicked;
int mEmoteMoved;