summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/text.h47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/text.h b/src/text.h
index e57fc06a..995b9a58 100644
--- a/src/text.h
+++ b/src/text.h
@@ -30,43 +30,41 @@ class TextManager;
class Text
{
- friend class TextManager;
+ friend class TextManager;
+
public:
/**
- * Constructor creates a text object to display on the screen
+ * Constructor creates a text object to display on the screen.
*/
Text(const std::string &text, int x, int y,
gcn::Graphics::Alignment alignment, gcn::Font *font,
gcn::Color colour);
/**
- * Allows the originator of the text to specify the ideal coordinates
+ * Destructor. The text is removed from the screen.
*/
- void
- adviseXY(int x, int y);
+ virtual ~Text();
/**
- * Remove the text from the screen
+ * Allows the originator of the text to specify the ideal coordinates.
*/
- ~Text();
+ void adviseXY(int x, int y);
/**
- * Draws the text
+ * Draws the text.
*/
- virtual void
- draw(Graphics *graphics, int xOff, int yOff);
+ virtual void draw(Graphics *graphics, int xOff, int yOff);
private:
-
- int mX; /**< Actual x-value of left of text written */
- int mY; /**< Actual y-value of top of text written */
- int mWidth; /**< The width of the text */
- int mHeight; /**< The height of the text */
- int mXOffset; /**< The offset of mX from the desired x */
- static int mInstances; /**< Instances of text */
- gcn::Font *mFont; /**< The font used */
- std::string mText; /**< The text to display */
- gcn::Color mColour; /**< The colour of the text */
+ int mX; /**< Actual x-value of left of text written. */
+ int mY; /**< Actual y-value of top of text written. */
+ int mWidth; /**< The width of the text. */
+ int mHeight; /**< The height of the text. */
+ int mXOffset; /**< The offset of mX from the desired x. */
+ static int mInstances; /**< Instances of text. */
+ gcn::Font *mFont; /**< The font used. */
+ std::string mText; /**< The text to display. */
+ gcn::Color mColour; /**< The colour of the text. */
};
class FlashText : public Text
@@ -77,18 +75,17 @@ class FlashText : public Text
gcn::Color colour);
/**
- * 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(Graphics *graphics, int xOff, int yOff);
+ virtual void draw(Graphics *graphics, int xOff, int yOff);
private:
- int mTime; /**< Time left for flashing */
+ int mTime; /**< Time left for flashing. */
};
#endif // _TMW_TEXT_H