summaryrefslogtreecommitdiff
path: root/src/gui/emotecontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/emotecontainer.cpp')
-rw-r--r--src/gui/emotecontainer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp
index e22b031b..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");
@@ -78,13 +78,14 @@ EmoteContainer::~EmoteContainer()
void EmoteContainer::draw(gcn::Graphics *graphics)
{
+ if (!isVisible())
+ return;
+
int columns = getWidth() / gridWidth;
// Have at least 1 column
if (columns < 1)
- {
columns = 1;
- }
for (int i = 0; i < mMaxEmote ; i++)
{