diff options
-rw-r--r-- | engines/director/frame.cpp | 4 | ||||
-rw-r--r-- | graphics/macgui/mactext.cpp | 5 | ||||
-rw-r--r-- | graphics/macgui/mactext.h | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index 178b8b8c21..e6a8505fea 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -786,9 +786,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, const else alignment++; - Graphics::MacText mt(stxt->_ftext, _vm->_wm, macFont, 0x00, 0xff, width, (Graphics::TextAlign)alignment); - - mt.setInterLinear(1); + Graphics::MacText mt(stxt->_ftext, _vm->_wm, macFont, 0x00, 0xff, width, (Graphics::TextAlign)alignment, 1); mt.render(); const Graphics::ManagedSurface *textSurface = mt.getSurface(); diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index 62c4e8efa4..0f9c120758 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -42,7 +42,7 @@ MacText::~MacText(){ delete _macFont; } -MacText::MacText(Common::String s, MacWindowManager *wm, const MacFont *macFont, 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, int interlinear) { _str = s; _wm = wm; _macFont = macFont; @@ -53,8 +53,7 @@ MacText::MacText(Common::String s, MacWindowManager *wm, const MacFont *macFont, _textMaxHeight = 0; _surface = nullptr; _textAlignment = textAlignment; - - _interLinear = 0; // 0 pixels between the lines by default + _interLinear = interlinear; if (macFont) { _defaultFormatting.font = wm->_fontMan->getFont(*macFont); diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h index 25f6002707..f0a3ed6a0c 100644 --- a/graphics/macgui/mactext.h +++ b/graphics/macgui/mactext.h @@ -89,7 +89,8 @@ struct MacTextLine { class MacText { public: MacText(Common::String s, MacWindowManager *wm, const MacFont *font, int fgcolor, int bgcolor, - int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft); + int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0); + // 0 pixels between the lines by default ~MacText(); void setInterLinear(int interLinear); |