diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-12 06:44:16 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-12 06:44:16 -0600 |
commit | e2d60401eaf55abe9e2251854f3174ffe0f4ad9e (patch) | |
tree | 99be0ae61a6b4c97cafeb6458491f38cb7904d8a /src/gui | |
parent | 2eb027b0f7a67706df68fe29e605c5be7fc1d5c9 (diff) | |
download | mana-client-e2d60401eaf55abe9e2251854f3174ffe0f4ad9e.tar.gz mana-client-e2d60401eaf55abe9e2251854f3174ffe0f4ad9e.tar.bz2 mana-client-e2d60401eaf55abe9e2251854f3174ffe0f4ad9e.tar.xz mana-client-e2d60401eaf55abe9e2251854f3174ffe0f4ad9e.zip |
Move emote sprite loading into EmoteDB
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/emotecontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/emotecontainer.h | 2 | ||||
-rw-r--r-- | src/gui/emoteshortcutcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/emoteshortcutcontainer.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp index ad3f5c83..ececd9aa 100644 --- a/src/gui/emotecontainer.cpp +++ b/src/gui/emotecontainer.cpp @@ -53,7 +53,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 fefce793..88df29fc 100644 --- a/src/gui/emotecontainer.h +++ b/src/gui/emotecontainer.h @@ -121,7 +121,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 df1bf74c..c96ea855 100644 --- a/src/gui/emoteshortcutcontainer.cpp +++ b/src/gui/emoteshortcutcontainer.cpp @@ -59,7 +59,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; @@ -112,7 +112,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 d32a9f79..2997cb09 100644 --- a/src/gui/emoteshortcutcontainer.h +++ b/src/gui/emoteshortcutcontainer.h @@ -68,7 +68,7 @@ class EmoteShortcutContainer : public ShortcutContainer void mouseReleased(gcn::MouseEvent &event); private: - std::vector<AnimatedSprite*> mEmoteImg; + std::vector<const AnimatedSprite*> mEmoteImg; bool mEmoteClicked; int mEmoteMoved; |