diff options
author | Max Horn | 2002-07-07 13:14:34 +0000 |
---|---|---|
committer | Max Horn | 2002-07-07 13:14:34 +0000 |
commit | 2d73a779cbd8c029c63415b7afb69a88ad97d3da (patch) | |
tree | 2a66d6be62e830a7d00e3cf1d2c4ba5526ab0566 /gui/widget.cpp | |
parent | 465164a3ba557f1c468aa39bb3b3ebb00a4aa4ac (diff) | |
download | scummvm-rg350-2d73a779cbd8c029c63415b7afb69a88ad97d3da.tar.gz scummvm-rg350-2d73a779cbd8c029c63415b7afb69a88ad97d3da.tar.bz2 scummvm-rg350-2d73a779cbd8c029c63415b7afb69a88ad97d3da.zip |
applied indent to a couple of source files; added .indent.pro file with default indent settings as per readme.txt
svn-id: r4469
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r-- | gui/widget.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 35e0afc366..a423529005 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -24,8 +24,8 @@ #include "newgui.h" -Widget::Widget(Dialog *boss, int x, int y, int w, int h) - : _boss(boss), _x(x), _y(y), _w(w), _h(h), _id(0), _flags(0) +Widget::Widget(Dialog * boss, int x, int y, int w, int h) +:_boss(boss), _x(x), _y(y), _w(w), _h(h), _id(0), _flags(0) { // Insert into the widget list of the boss _next = _boss->_firstWidget; @@ -40,26 +40,24 @@ void Widget::draw() // Account for our relative position in the dialog _x += _boss->_x; _y += _boss->_y; - + // Clear background if (_flags & WIDGET_CLEARBG) _boss->_gui->clearArea(_x, _y, _w, _h); - + // Draw border if (_flags & WIDGET_BORDER) { _boss->_gui->box(_x, _y, _w, _h); _x += 4; _y += 4; } - // Now perform the actual widget draw drawWidget(_flags & WIDGET_HILITED); - + if (_flags & WIDGET_BORDER) { _x -= 4; _y -= 4; } - // Restore x/y _x -= _boss->_x; _y -= _boss->_y; @@ -69,8 +67,8 @@ void Widget::draw() #pragma mark - -StaticTextWidget::StaticTextWidget(Dialog *boss, int x, int y, int w, int h, const char *text) - : Widget(boss, x, y, w, h) +StaticTextWidget::StaticTextWidget(Dialog * boss, int x, int y, int w, int h, const char *text) +:Widget(boss, x, y, w, h) { // FIXME - maybe we should make a real copy of the string? _text = text; @@ -78,7 +76,7 @@ StaticTextWidget::StaticTextWidget(Dialog *boss, int x, int y, int w, int h, con void StaticTextWidget::drawWidget(bool hilite) { - NewGui *gui = _boss->_gui; + NewGui *gui = _boss->_gui; gui->drawString(_text, _x, _y, _w, hilite ? gui->_textcolorhi : gui->_textcolor); } @@ -86,10 +84,10 @@ void StaticTextWidget::drawWidget(bool hilite) #pragma mark - -ButtonWidget::ButtonWidget(Dialog *boss, int x, int y, int w, int h, const char *label, uint32 cmd) - : StaticTextWidget(boss, x, y, w, h, label), _cmd(cmd), _hotkey(0) +ButtonWidget::ButtonWidget(Dialog * boss, int x, int y, int w, int h, const char *label, uint32 cmd) +:StaticTextWidget(boss, x, y, w, h, label), _cmd(cmd), _hotkey(0) { - _flags = WIDGET_ENABLED | WIDGET_BORDER /* | WIDGET_CLEARBG */; + _flags = WIDGET_ENABLED | WIDGET_BORDER /* | WIDGET_CLEARBG */ ; } void ButtonWidget::handleClick(int button) |