diff options
Diffstat (limited to 'src/text.cpp')
-rw-r--r-- | src/text.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/text.cpp b/src/text.cpp index b71667c5..26124666 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -136,20 +136,21 @@ void Text::draw(gcn::Graphics *graphics, int xOff, int yOff) *mColor, mFont, !mIsSpeech, true); } -FlashText::FlashText(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, - const gcn::Color *color, gcn::Font *font) : - Text(text, x, y, alignment, color, false, font), - mTime(0) -{ -} void FlashText::draw(gcn::Graphics *graphics, int xOff, int yOff) { - if (mTime) + if (mTimer.isSet()) { - if ((--mTime & 4) == 0) - return; + if (!mTimer.passed()) + { + if ((mTimer.elapsed() & 64) == 0) + return; + } + else + { + mTimer.reset(); + } } + Text::draw(graphics, xOff, yOff); } |