diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-08-28 20:29:06 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-08-28 20:29:06 +0000 |
commit | bdb09d26fc6c489228cb2c28be75024f9a49eb75 (patch) | |
tree | 28ea782fa98c6fe8b060da71a0bb626781ab1b5d /src/player_relations.cpp | |
parent | 9a8456c6c95f5d95c568664ba5adaeb466cfbb0d (diff) | |
download | mana-bdb09d26fc6c489228cb2c28be75024f9a49eb75.tar.gz mana-bdb09d26fc6c489228cb2c28be75024f9a49eb75.tar.bz2 mana-bdb09d26fc6c489228cb2c28be75024f9a49eb75.tar.xz mana-bdb09d26fc6c489228cb2c28be75024f9a49eb75.zip |
Accepted Patch by Scraggy that moves text in such a way that no text overlaps
Diffstat (limited to 'src/player_relations.cpp')
-rw-r--r-- | src/player_relations.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/player_relations.cpp b/src/player_relations.cpp index 610f5d04..c494dc74 100644 --- a/src/player_relations.cpp +++ b/src/player_relations.cpp @@ -88,7 +88,7 @@ PlayerRelationsManager::PlayerRelationsManager() : mDefaultPermissions(PlayerRelation::DEFAULT), mIgnoreStrategy(NULL) { -} +} void PlayerRelationsManager::clear() @@ -325,29 +325,6 @@ public: }; -class -BlinkPlayerNameDrawStrategy : public PlayerNameDrawStrategy -{ -public: - BlinkPlayerNameDrawStrategy(int count) : - mCount(count) - { - } - - virtual void draw(Player *player, Graphics *graphics, int px, int py) - { - graphics->setFont(speechFont); - if (mCount & 4) - graphics->drawText(player->getName(), px + 15, py + 30, gcn::Graphics::CENTER); - - if (mCount-- <= 0) - player->setNameDrawStrategy(NULL); - } -private: - int mCount; // Number of steps to blink -}; - - class PIS_blinkname : public PlayerIgnoreStrategy { public: @@ -359,9 +336,9 @@ public: virtual void ignore(Player *player, unsigned int flags) - { - player->setNameDrawStrategy(new BlinkPlayerNameDrawStrategy(200)); - } + { + player->flash(200); + } }; class PIS_emote : public PlayerIgnoreStrategy @@ -407,4 +384,3 @@ PlayerRelationsManager::getPlayerIgnoreStrategies() PlayerRelationsManager player_relations; - |