summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-27 21:29:06 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-27 21:29:06 +0300
commit420664f4025b261674e0cdea503d43fb95beae38 (patch)
treea7f75459b34593f355384abe9e68c20239d1c51a /src/text.h
parentb2f868c841bf466714796bc9ce155f411ae8df06 (diff)
downloadmanaplus-420664f4025b261674e0cdea503d43fb95beae38.tar.gz
manaplus-420664f4025b261674e0cdea503d43fb95beae38.tar.bz2
manaplus-420664f4025b261674e0cdea503d43fb95beae38.tar.xz
manaplus-420664f4025b261674e0cdea503d43fb95beae38.zip
Add strong typed bool type Speech.
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/text.h b/src/text.h
index 845b96353..916de924e 100644
--- a/src/text.h
+++ b/src/text.h
@@ -24,6 +24,8 @@
#ifndef TEXT_H
#define TEXT_H
+#include "enums/simpletypes/speech.h"
+
#include "gui/fonts/textchunk.h"
#include "render/graphics.h"
@@ -40,9 +42,11 @@ class Text notfinal
/**
* Constructor creates a text object to display on the screen.
*/
- Text(const std::string &text, const int x, const int y,
+ Text(const std::string &text,
+ const int x, const int y,
const Graphics::Alignment alignment,
- const Color *const color, const bool isSpeech = false,
+ const Color *const color,
+ const Speech isSpeech = Speech_false,
Font *const font = nullptr);
A_DELETE_COPY(Text)
@@ -83,7 +87,7 @@ class Text notfinal
std::string mText; /**< The text to display. */
const Color *mColor; /**< The color of the text. */
Color mOutlineColor;
- bool mIsSpeech; /**< Is this text a speech bubble? */
+ Speech mIsSpeech; /**< Is this text a speech bubble? */
bool mTextChanged;
protected: