diff options
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/macgui/mactext.cpp | 11 | ||||
| -rw-r--r-- | graphics/macgui/mactext.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index 180b08175b..9dcb380833 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -37,10 +37,10 @@ const Font *MacFontRun::getFont() { return font; } -MacText::MacText(Common::String s, MacWindowManager *wm, const Font *font, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment) { +MacText::MacText(Common::String s, MacWindowManager *wm, const MacFont *macFont, int fgcolor, int bgcolor, int maxWidth, TextAlign textAlignment) { _str = s; _wm = wm; - _font = font; + _macFont = macFont; _fgcolor = fgcolor; _bgcolor = bgcolor; _maxWidth = maxWidth; @@ -51,7 +51,12 @@ MacText::MacText(Common::String s, MacWindowManager *wm, const Font *font, int f _interLinear = 0; // 0 pixels between the lines by default - _defaultFormatting.font = font; + if (macFont) { + _defaultFormatting.font = wm->_fontMan->getFont(*macFont); + } else { + _defaultFormatting.font = NULL; + } + _defaultFormatting.wm = wm; _currentFormatting = _defaultFormatting; diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h index 85c855950f..c9d24a006d 100644 --- a/graphics/macgui/mactext.h +++ b/graphics/macgui/mactext.h @@ -88,7 +88,7 @@ struct MacTextLine { class MacText { public: - MacText(Common::String s, MacWindowManager *wm, const Graphics::Font *font, int fgcolor, int bgcolor, + MacText(Common::String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft); void setInterLinear(int interLinear); @@ -113,7 +113,7 @@ private: MacWindowManager *_wm; Common::String _str; - const Graphics::Font *_font; + const MacFont *_macFont; int _fgcolor, _bgcolor; int _maxWidth; |
