From 94eb2cb314e2629a659245554106ffe5e48f4d62 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Jul 2015 02:37:09 +0300 Subject: Add method for get text object width. --- src/text.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/text.cpp') diff --git a/src/text.cpp b/src/text.cpp index c4540dd4c..7dbaa7a20 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -178,6 +178,11 @@ void Text::draw(Graphics *const graphics, const int xOff, const int yOff) BLOCK_END("Text::draw") } +int Text::getWidth() +{ + return mTextChunk.img->getWidth(); +} + FlashText::FlashText(const std::string &text, const int x, const int y, const Graphics::Alignment alignment, -- cgit v1.2.3-70-g09d2