aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactext.h
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-18 17:20:02 +0200
committerEugene Sandulenko2019-10-18 17:20:27 +0200
commit419cb1e7c77f7b8089b19becabff105ea4d5e7d5 (patch)
tree12438010dfa7c00cfe07e5aaed937fab9595fb8f /graphics/macgui/mactext.h
parent9ff8e69aa98b41a92ac561bfbb15efb9cf58cdac (diff)
downloadscummvm-rg350-419cb1e7c77f7b8089b19becabff105ea4d5e7d5.tar.gz
scummvm-rg350-419cb1e7c77f7b8089b19becabff105ea4d5e7d5.tar.bz2
scummvm-rg350-419cb1e7c77f7b8089b19becabff105ea4d5e7d5.zip
GRAPHICS: MACGUI: Switched MacText to U32String internally
Diffstat (limited to 'graphics/macgui/mactext.h')
-rw-r--r--graphics/macgui/mactext.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h
index 7cb115902e..e66a394c0d 100644
--- a/graphics/macgui/mactext.h
+++ b/graphics/macgui/mactext.h
@@ -32,7 +32,7 @@ namespace Graphics {
class MacWindowManager;
struct MacFontRun {
- Common::String text;
+ Common::U32String text;
uint16 fontId;
byte textSlant;
@@ -88,7 +88,9 @@ struct MacTextLine {
class MacText {
public:
- MacText(Common::String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
+ MacText(Common::U32String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
+ int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
+ MacText(const Common::String &s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor,
int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
// 0 pixels between the lines by default
~MacText();
@@ -102,10 +104,13 @@ public:
}
void draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff);
- void appendText(Common::String str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
- void appendTextDefault(Common::String str, bool skipAdd = false);
+ void appendText(Common::U32String str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
+ void appendText(const Common::String &str, int fontId = kMacFontChicago, int fontSize = 12, int fontSlant = kMacFontRegular, bool skipAdd = false);
+ void appendTextDefault(Common::U32String str, bool skipAdd = false);
+ void appendTextDefault(const Common::String &str, bool skipAdd = false);
void clearText();
- void replaceLastLine(Common::String str);
+ void replaceLastLine(Common::U32String str);
+ void replaceLastLine(const Common::String &str);
void removeLastLine();
int getLineCount() { return _textLines.size(); }
int getTextHeight() { return _textMaxHeight; }
@@ -116,10 +121,10 @@ public:
void getRowCol(int x, int y, int *sx, int *sy, int *row, int *col);
- Common::String getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted = false, bool newlines = true);
+ Common::U32String getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted = false, bool newlines = true);
private:
- void splitString(Common::String &s);
+ void splitString(Common::U32String &s);
void render(int from, int to);
void recalcDims();
void reallocSurface();
@@ -128,7 +133,7 @@ private:
private:
MacWindowManager *_wm;
- Common::String _str;
+ Common::U32String _str;
const MacFont *_macFont;
int _fgcolor, _bgcolor;