From 420664f4025b261674e0cdea503d43fb95beae38 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 May 2015 21:29:06 +0300 Subject: Add strong typed bool type Speech. --- src/text.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/text.h') 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: -- cgit v1.2.3-60-g2f50