aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/UIButton.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-05-11 16:03:59 +0200
committerEinar Johan Trøan Sømåen2012-06-02 13:01:15 +0200
commitba6a2ac66ea3e679246a28e81013f7c4794ed564 (patch)
tree9e187c8259f0ad8f38b29c4d66abef675a9e7ff3 /engines/wintermute/UIButton.cpp
parent2ee58d2dc3f78e03f25edf7103403ee06ba9ab7a (diff)
downloadscummvm-rg350-ba6a2ac66ea3e679246a28e81013f7c4794ed564.tar.gz
scummvm-rg350-ba6a2ac66ea3e679246a28e81013f7c4794ed564.tar.bz2
scummvm-rg350-ba6a2ac66ea3e679246a28e81013f7c4794ed564.zip
WINTERMUTE: Run Astyle on code-files to reformat.
Diffstat (limited to 'engines/wintermute/UIButton.cpp')
-rw-r--r--engines/wintermute/UIButton.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/wintermute/UIButton.cpp b/engines/wintermute/UIButton.cpp
index 988760f567..15a9d6f49b 100644
--- a/engines/wintermute/UIButton.cpp
+++ b/engines/wintermute/UIButton.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -562,8 +562,8 @@ void CUIButton::CorrectSize() {
if (_text) {
int text_height;
- if (_font) text_height = _font->GetTextHeight((byte *)_text, _width);
- else text_height = Game->_systemFont->GetTextHeight((byte *)_text, _width);
+ if (_font) text_height = _font->GetTextHeight((byte *)_text, _width);
+ else text_height = Game->_systemFont->GetTextHeight((byte *)_text, _width);
if (text_height > _height) _height = text_height;
}
@@ -631,8 +631,8 @@ HRESULT CUIButton::Display(int OffsetX, int OffsetY) {
if (image) image->Draw(ImageX + ((_press || _oneTimePress) && back ? 1 : 0), ImageY + ((_press || _oneTimePress) && back ? 1 : 0), _pixelPerfect ? this : NULL);
if (font && _text) {
- int text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2;
- font->DrawText((byte *)_text, OffsetX + _posX + ((_press || _oneTimePress) ? 1 : 0), OffsetY + _posY + text_offset + ((_press || _oneTimePress) ? 1 : 0), _width, _align);
+ int text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2;
+ font->DrawText((byte *)_text, OffsetX + _posX + ((_press || _oneTimePress) ? 1 : 0), OffsetY + _posY + text_offset + ((_press || _oneTimePress) ? 1 : 0), _width, _align);
}
if (!_pixelPerfect || !_image) Game->_renderer->_rectList.Add(new CBActiveRect(Game, this, NULL, OffsetX + _posX, OffsetY + _posY, _width, _height, 100, 100, false));