summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/text.h b/src/text.h
index 43d6b5ea..8d463223 100644
--- a/src/text.h
+++ b/src/text.h
@@ -1,22 +1,24 @@
-/***************************************************************************
- * Copyright (C) 2008 by Douglas Boffey *
- * *
- * DougABoffey@netscape.net *
- * 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 *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
+/*
+ * The Mana World
+ * Copyright (C) 2008 Douglas Boffey <DougABoffey@netscape.net>
+ * Copyright (C) 2008 The Mana World Development Team
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#ifndef TEXT_H
#define TEXT_H
@@ -37,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 colour);
+ gcn::Graphics::Alignment alignment,
+ gcn::Color colour, bool isSpeech = false);
/**
* Destructor. The text is removed from the screen.
@@ -63,13 +66,19 @@ class Text
static int mInstances; /**< Instances of text. */
std::string mText; /**< The text to display. */
gcn::Color mColour; /**< The colour 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 colour);
+ gcn::Graphics::Alignment alignment,
+ gcn::Color colour);
/**
* Remove the text from the screen
@@ -77,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(Graphics *graphics, int xOff, int yOff);