diff options
Diffstat (limited to 'src/text.h')
-rw-r--r-- | src/text.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/text.h b/src/text.h index 2c6b9b2b4..497792091 100644 --- a/src/text.h +++ b/src/text.h @@ -26,10 +26,12 @@ #include "render/graphics.h" -#include <guichan/color.hpp> +#include "gui/color.h" #include "localconsts.h" +class Font; + class Text { friend class TextManager; @@ -39,9 +41,9 @@ class Text * Constructor creates a text object to display on the screen. */ Text(const std::string &text, const int x, const int y, - const gcn::Graphics::Alignment alignment, - const gcn::Color *const color, const bool isSpeech = false, - gcn::Font *const font = nullptr); + const Graphics::Alignment alignment, + const Color *const color, const bool isSpeech = false, + Font *const font = nullptr); A_DELETE_COPY(Text) @@ -50,7 +52,7 @@ class Text */ virtual ~Text(); - void setColor(const gcn::Color *const color); + void setColor(const Color *const color); int getWidth() const A_WARN_UNUSED { return mWidth; } @@ -70,7 +72,7 @@ class Text const int xOff, const int yOff); private: - gcn::Font *mFont; /**< The font of the text */ + Font *mFont; /**< The font 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. */ @@ -78,8 +80,8 @@ 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. */ - const gcn::Color *mColor; /**< The color of the text. */ - const gcn::Color mOutlineColor; + const Color *mColor; /**< The color of the text. */ + const Color mOutlineColor; bool mIsSpeech; /**< Is this text a speech bubble? */ protected: @@ -90,9 +92,9 @@ class FlashText final : public Text { public: FlashText(const std::string &text, const int x, const int y, - const gcn::Graphics::Alignment alignment, - const gcn::Color *const color, - gcn::Font *const font = nullptr); + const Graphics::Alignment alignment, + const Color *const color, + Font *const font = nullptr); A_DELETE_COPY(FlashText) |