diff options
author | Tobia Tesan | 2017-04-30 23:02:39 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-05-02 21:01:23 +0100 |
commit | 6a741a88c98da78ca860054fce387cb66f57d5cf (patch) | |
tree | 3e66af0e7f310937bcc041759e062bf4c1c6d84a | |
parent | 4ae5453af8ad35835ebecd07b9108fae4eec64a8 (diff) | |
download | scummvm-rg350-6a741a88c98da78ca860054fce387cb66f57d5cf.tar.gz scummvm-rg350-6a741a88c98da78ca860054fce387cb66f57d5cf.tar.bz2 scummvm-rg350-6a741a88c98da78ca860054fce387cb66f57d5cf.zip |
GRAPHICS: Pass interlinear as constructor argument to MacText
-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); |