diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-11-03 23:50:35 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-11-07 23:26:37 -0500 |
commit | c81b3c269e39700be94fd9e2629b0bdfb0d093f8 (patch) | |
tree | c4dbca3f9dbb288151fec3171089e12295d33e04 /src/gui/widgets | |
parent | 671a465fa2c9469bde36b78c49e84bd0325c4cf1 (diff) | |
download | mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.gz mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.bz2 mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.xz mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.zip |
Convert the emote system to use particles
Reviewed-by: Jared Adams
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.h | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 7a24c464..f7a6ca2b 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -20,11 +20,11 @@ #include "gui/widgets/emoteshortcutcontainer.h" -#include "animatedsprite.h" #include "configuration.h" #include "emoteshortcut.h" #include "graphics.h" #include "inventory.h" +#include "imagesprite.h" #include "item.h" #include "itemshortcut.h" #include "keyboardconfig.h" @@ -56,7 +56,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): // Setup emote sprites for (int i = 0; i <= EmoteDB::getLast(); i++) { - mEmoteImg.push_back(EmoteDB::getAnimation(i)); + mEmoteImg.push_back(EmoteDB::get(i)->sprite); } mMaxItems = EmoteDB::getLast() < MAX_ITEMS ? EmoteDB::getLast() : MAX_ITEMS; @@ -106,7 +106,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics) if (mEmoteMoved) { // Draw the emote image being dragged by the cursor. - const AnimatedSprite* sprite = mEmoteImg[mEmoteMoved - 1]; + const ImageSprite* sprite = mEmoteImg[mEmoteMoved - 1]; if (sprite) { const int tPosX = mCursorPosX - (sprite->getWidth() / 2); diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h index e90612b4..c3fb9d14 100644 --- a/src/gui/widgets/emoteshortcutcontainer.h +++ b/src/gui/widgets/emoteshortcutcontainer.h @@ -25,8 +25,7 @@ #include <vector> -class AnimatedSprite; -class Image; +class ImageSprite; /** * An emote shortcut container. Used to quickly use emoticons. @@ -67,7 +66,7 @@ class EmoteShortcutContainer : public ShortcutContainer void mouseReleased(gcn::MouseEvent &event); private: - std::vector<const AnimatedSprite*> mEmoteImg; + std::vector<const ImageSprite*> mEmoteImg; bool mEmoteClicked; int mEmoteMoved; |