aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.h
diff options
context:
space:
mode:
authorJohannes Schickel2013-11-23 21:34:54 +0100
committerJohannes Schickel2013-11-23 21:34:54 +0100
commit9da09f584679553098c748f2839a617ed1774e83 (patch)
treeb94510be5b1557239bee4539bddcbcd06ed1a0e9 /graphics/font.h
parent09c634dd555c9ed102f2f583813c4b943235be47 (diff)
downloadscummvm-rg350-9da09f584679553098c748f2839a617ed1774e83.tar.gz
scummvm-rg350-9da09f584679553098c748f2839a617ed1774e83.tar.bz2
scummvm-rg350-9da09f584679553098c748f2839a617ed1774e83.zip
GRAPHICS: Allow Font to accept U32String as strings.
Diffstat (limited to 'graphics/font.h')
-rw-r--r--graphics/font.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/font.h b/graphics/font.h
index 62538e3e59..77b7623a85 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -23,6 +23,7 @@
#define GRAPHICS_FONT_H
#include "common/str.h"
+#include "common/ustr.h"
namespace Common {
template<class T> class Array;
@@ -100,11 +101,13 @@ public:
// TODO: Add doxygen comments to this
void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
+ void drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft) const;
/**
* Compute and return the width the string str has when rendered using this font.
*/
int getStringWidth(const Common::String &str) const;
+ int getStringWidth(const Common::U32String &str) const;
/**
* Take a text (which may contain newline characters) and word wrap it so that
@@ -120,6 +123,7 @@ public:
* @return the maximal width of any of the lines added to lines
*/
int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const;
+ int wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines) const;
};
} // End of namespace Graphics