aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-28 12:14:49 +0100
committerEugene Sandulenko2017-01-28 12:14:49 +0100
commitca55163ea1daa6e322ef1ddf4615ad73b4634e0d (patch)
tree603f3b64516d6e2079329f8b62db44107fb9f81c
parent1f721e929fdec3b5f6d90dbece6b3112fab4c681 (diff)
downloadscummvm-rg350-ca55163ea1daa6e322ef1ddf4615ad73b4634e0d.tar.gz
scummvm-rg350-ca55163ea1daa6e322ef1ddf4615ad73b4634e0d.tar.bz2
scummvm-rg350-ca55163ea1daa6e322ef1ddf4615ad73b4634e0d.zip
JANITORIAL: Fix code formatting
-rw-r--r--graphics/macgui/mactext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 7a23b018c3..1b5887263d 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -34,7 +34,7 @@ MacText::MacText(Common::String s, const Graphics::Font *font, int fgcolor, int
_surface = nullptr;
_textAlignment = textAlignment;
- _interLinear = 0; // 0 pixels between the lines by default
+ _interLinear = 0; // 0 pixels between the lines by default
splitString(_str);
@@ -121,8 +121,10 @@ void MacText::render(int from, int to) {
for (int i = from; i < to; i++) {
int xOffset = 0;
- if (_textAlignment == kTextAlignRight) xOffset = _textMaxWidth - _font->getStringWidth(_text[i]);
- else if (_textAlignment == kTextAlignCenter) xOffset = (_textMaxWidth / 2) - (_font->getStringWidth(_text[i]) / 2);
+ if (_textAlignment == kTextAlignRight)
+ xOffset = _textMaxWidth - _font->getStringWidth(_text[i]);
+ else if (_textAlignment == kTextAlignCenter)
+ xOffset = (_textMaxWidth / 2) - (_font->getStringWidth(_text[i]) / 2);
//TODO: _textMaxWidth, when -1, was not rendering ANY text.
_font->drawString(_surface, _text[i], xOffset, y, _maxWidth, _fgcolor);