summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/text.h b/src/text.h
index 0b53dd48..6e121da7 100644
--- a/src/text.h
+++ b/src/text.h
@@ -3,7 +3,7 @@
* Copyright (C) 2008 Douglas Boffey <DougABoffey@netscape.net>
* Copyright (C) 2008 The Mana World Development Team
*
- * This file is part of Aethyra.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,8 +24,8 @@
#define TEXT_H
#include <guichan/color.hpp>
-#include <guichan/graphics.hpp>
+#include "graphics.h"
#include "guichanfwd.h"
class TextManager;
@@ -39,7 +39,8 @@ class Text
* Constructor creates a text object to display on the screen.
*/
Text(const std::string &text, int x, int y,
- gcn::Graphics::Alignment alignment, gcn::Color color);
+ gcn::Graphics::Alignment alignment,
+ gcn::Color color, bool isSpeech = false);
/**
* Destructor. The text is removed from the screen.
@@ -64,14 +65,20 @@ class Text
int mXOffset; /**< The offset of mX from the desired x. */
static int mInstances; /**< Instances of text. */
std::string mText; /**< The text to display. */
- gcn::Color mColor; /**< The color of the text. */
+ gcn::Color mColor; /**< The color of the text. */
+ bool mIsSpeech; /**< Is this text a speech bubble? */
+
+ protected:
+ static ImageRect mBubble; /**< Speech bubble graphic */
+ static Image *mBubbleArrow; /**< Speech bubble arrow graphic */
};
class FlashText : public Text
{
public:
FlashText(const std::string &text, int x, int y,
- gcn::Graphics::Alignment alignment, gcn::Color color);
+ gcn::Graphics::Alignment alignment,
+ gcn::Color color);
/**
* Remove the text from the screen
@@ -79,12 +86,12 @@ class FlashText : public Text
virtual ~FlashText() {}
/**
- * Flash the text for so many refreshes
+ * Flash the text for so many refreshes.
*/
void flash(int time) {mTime = time; }
/**
- * Draws the text
+ * Draws the text.
*/
virtual void draw(gcn::Graphics *graphics, int xOff, int yOff);