summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/text.h
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2013-02-09 23:49:38 +0100
committererihel <erihel@gmail.com>2013-02-09 23:49:38 +0100
commit3f6a6a9eefc54452dc99a15f67bdfabc7e19788b (patch)
tree922f41e337ff55439d0d622b3fb15448d937e9d6 /src/graphics/engine/text.h
parent6f64770714c20a24a2edfd55777e05a047e61d0e (diff)
downloadcolobot-3f6a6a9eefc54452dc99a15f67bdfabc7e19788b.tar.gz
colobot-3f6a6a9eefc54452dc99a15f67bdfabc7e19788b.tar.bz2
colobot-3f6a6a9eefc54452dc99a15f67bdfabc7e19788b.zip
* Syntax highlighting in cbot editor (needs to be tested)
Diffstat (limited to 'src/graphics/engine/text.h')
-rw-r--r--src/graphics/engine/text.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h
index 57fad43..e7578df 100644
--- a/src/graphics/engine/text.h
+++ b/src/graphics/engine/text.h
@@ -244,7 +244,7 @@ public:
void FlushCache();
//! Draws text (multi-format)
- void DrawText(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
+ void DrawText(const std::string &text, std::vector<FontMetaChar>::iterator format,
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)
@@ -253,7 +253,7 @@ public:
int eol, Color color = Color(0.0f, 0.0f, 0.0f, 1.0f));
//! Calculates dimensions for text (multi-format)
- void SizeText(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
+ void SizeText(const std::string &text, std::vector<FontMetaChar>::iterator format,
float size, Math::Point pos, TextAlign align,
Math::Point &start, Math::Point &end);
//! Calculates dimensions for text (one font)
@@ -270,20 +270,20 @@ public:
//! Returns width of string (multi-format)
TEST_VIRTUAL float GetStringWidth(const std::string &text,
- std::map<unsigned int, FontMetaChar> &format, float size);
+ std::vector<FontMetaChar>::iterator format, 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
TEST_VIRTUAL float GetCharWidth(UTF8Char ch, FontType font, float size, float offset);
//! Justifies a line of text (multi-format)
- int Justify(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
+ int Justify(const std::string &text, std::vector<FontMetaChar>::iterator format,
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::map<unsigned int, FontMetaChar> &format,
+ int Detect(const std::string &text, std::vector<FontMetaChar>::iterator format,
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);
@@ -292,7 +292,7 @@ protected:
CachedFont* GetOrOpenFont(FontType type, float size);
CharTexture CreateCharTexture(UTF8Char ch, CachedFont* font);
- void DrawString(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
+ void DrawString(const std::string &text, std::vector<FontMetaChar>::iterator format,
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);