diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-31 01:27:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-31 01:27:37 +0300 |
commit | 9d3b975bcb84ad1c61d628de2804751c0d0707dd (patch) | |
tree | fe7494b1ecd561a40dc96d088c77d69b6d4ce13e /src/guichan/widgets/button.cpp | |
parent | 1d0044cbc81e547ad688a295288910d58e1a3fb1 (diff) | |
download | manaverse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.gz manaverse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.bz2 manaverse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.xz manaverse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.zip |
Fix code style and missing members initialisations.
Diffstat (limited to 'src/guichan/widgets/button.cpp')
-rw-r--r-- | src/guichan/widgets/button.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/guichan/widgets/button.cpp b/src/guichan/widgets/button.cpp index 96e64406e..9f18cab40 100644 --- a/src/guichan/widgets/button.cpp +++ b/src/guichan/widgets/button.cpp @@ -143,7 +143,8 @@ namespace gcn } graphics->setColor(faceColor); - graphics->fillRectangle(Rectangle(1, 1, getDimension().width-1, getHeight() - 1)); + graphics->fillRectangle(Rectangle(1, 1, + getDimension().width - 1, getHeight() - 1)); graphics->setColor(highlightColor); graphics->drawLine(0, 0, getWidth() - 1, 0); @@ -151,7 +152,8 @@ namespace gcn graphics->setColor(shadowColor); graphics->drawLine(getWidth() - 1, 1, getWidth() - 1, getHeight() - 1); - graphics->drawLine(1, getHeight() - 1, getWidth() - 1, getHeight() - 1); + graphics->drawLine(1, getHeight() - 1, + getWidth() - 1, getHeight() - 1); graphics->setColor(getForegroundColor()); @@ -177,7 +179,8 @@ namespace gcn if (isPressed()) { - graphics->drawText(getCaption(), textX + 1, textY + 1, getAlignment()); + graphics->drawText(getCaption(), textX + 1, textY + 1, + getAlignment()); } else { @@ -186,7 +189,7 @@ namespace gcn if (isFocused()) { graphics->drawRectangle(Rectangle(2, 2, getWidth() - 4, - getHeight() - 4)); + getHeight() - 4)); } } } @@ -267,7 +270,7 @@ namespace gcn Key key = keyEvent.getKey(); if ((key.getValue() == Key::ENTER - || key.getValue() == Key::SPACE) + || key.getValue() == Key::SPACE) && mKeyPressed) { mKeyPressed = false; |