From ba2df2cb4201597c9dc01365641413dcbf6812d9 Mon Sep 17 00:00:00 2001 From: erihel Date: Sun, 24 Feb 2013 01:40:55 +0100 Subject: * Fix for satcom freeze --- src/graphics/engine/text.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/graphics/engine/text.h') diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index d8e2aff..6bcc59b 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -242,6 +242,7 @@ public: //! Draws text (multi-format) void DrawText(const std::string &text, std::vector::iterator format, + std::vector::iterator end, float size, Math::Point pos, float width, TextAlign align, int eol, Color color = Color(0.0f, 0.0f, 0.0f, 1.0f)); //! Draws text (one font) @@ -251,6 +252,7 @@ public: //! Calculates dimensions for text (multi-format) void SizeText(const std::string &text, std::vector::iterator format, + std::vector::iterator endFormat, float size, Math::Point pos, TextAlign align, Math::Point &start, Math::Point &end); //! Calculates dimensions for text (one font) @@ -267,7 +269,8 @@ public: //! Returns width of string (multi-format) TEST_VIRTUAL float GetStringWidth(const std::string &text, - std::vector::iterator format, float size); + std::vector::iterator format, + std::vector::iterator end, float size); //! Returns width of string (single font) TEST_VIRTUAL float GetStringWidth(const std::string &text, FontType font, float size); //! Returns width of single character @@ -275,12 +278,14 @@ public: //! Justifies a line of text (multi-format) int Justify(const std::string &text, std::vector::iterator format, + std::vector::iterator end, float size, float width); //! Justifies a line of text (one font) int Justify(const std::string &text, FontType font, float size, float width); //! Returns the most suitable position to a given offset (multi-format) int Detect(const std::string &text, std::vector::iterator format, + std::vector::iterator end, float size, float offset); //! Returns the most suitable position to a given offset (one font) int Detect(const std::string &text, FontType font, float size, float offset); @@ -290,6 +295,7 @@ protected: CharTexture CreateCharTexture(UTF8Char ch, CachedFont* font); void DrawString(const std::string &text, std::vector::iterator format, + std::vector::iterator end, float size, Math::Point pos, float width, int eol, Color color); void DrawString(const std::string &text, FontType font, float size, Math::Point pos, float width, int eol, Color color); -- cgit v1.2.3-1-g7c22