diff options
author | Max Horn | 2002-07-07 21:46:53 +0000 |
---|---|---|
committer | Max Horn | 2002-07-07 21:46:53 +0000 |
commit | 2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091 (patch) | |
tree | 21d2206732b1c818858a160a23d3dee8ae8762fd /gui/widget.cpp | |
parent | aec25305294920da84a7d0721a2fd4e7f2547c74 (diff) | |
download | scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.gz scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.bz2 scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.zip |
added dialog nesting code (for now using std::stack, I will provide my own stack class later
svn-id: r4483
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r-- | gui/widget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 8384089541..0fbcfd20ba 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -25,7 +25,7 @@ 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) + : _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; @@ -51,6 +51,7 @@ void Widget::draw() _x += 4; _y += 4; } + // Now perform the actual widget draw drawWidget(_flags & WIDGET_HILITED); @@ -58,6 +59,7 @@ void Widget::draw() _x -= 4; _y -= 4; } + // Restore x/y _x -= _boss->_x; _y -= _boss->_y; @@ -68,7 +70,7 @@ void Widget::draw() StaticTextWidget::StaticTextWidget(Dialog *boss, int x, int y, int w, int h, const char *text) -:Widget (boss, x, y, w, h) + : Widget (boss, x, y, w, h) { // FIXME - maybe we should make a real copy of the string? _text = text; @@ -85,7 +87,7 @@ void StaticTextWidget::drawWidget(bool hilite) 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) + : StaticTextWidget(boss, x, y, w, h, label), _cmd(cmd), _hotkey(0) { _flags = WIDGET_ENABLED | WIDGET_BORDER /* | WIDGET_CLEARBG */ ; } |