diff options
| author | Max Horn | 2002-07-13 22:41:29 +0000 | 
|---|---|---|
| committer | Max Horn | 2002-07-13 22:41:29 +0000 | 
| commit | c3c11b79cb1fb41646265db458081eeedbd9ac1c (patch) | |
| tree | f4c9b9a080e2d231a2ddc848313ca3599b31f233 /gui/widget.cpp | |
| parent | 1238d7422705e88097d21a3d0e34683262be4331 (diff) | |
| download | scummvm-rg350-c3c11b79cb1fb41646265db458081eeedbd9ac1c.tar.gz scummvm-rg350-c3c11b79cb1fb41646265db458081eeedbd9ac1c.tar.bz2 scummvm-rg350-c3c11b79cb1fb41646265db458081eeedbd9ac1c.zip | |
added latest of painelf's patches which makes NewGui handle system events directly (code becomes much cleaner and more powerful this way); he also implemented a 'focus' item in NewGui; atop of this several changes of my own that further improve the GUI behaviour
svn-id: r4541
Diffstat (limited to 'gui/widget.cpp')
| -rw-r--r-- | gui/widget.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/gui/widget.cpp b/gui/widget.cpp index 22bf54096c..c72d44647c 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -34,7 +34,7 @@ Widget::Widget (Dialog *boss, int x, int y, int w, int h)  void Widget::draw()  { -	NewGui *gui = _boss->_gui; +	NewGui *gui = _boss->getGui();  	if (_flags & WIDGET_INVISIBLE)  		return; @@ -127,9 +127,9 @@ ButtonWidget::~ButtonWidget()  	}  } -void ButtonWidget::handleMouseDown(int x, int y, int button) +void ButtonWidget::handleMouseUp(int x, int y, int button)  { -	if (_flags & WIDGET_ENABLED) +	if (_flags & WIDGET_ENABLED && x >= 0 && x < _w && y >= 0 && y < _h)  		sendCommand(_cmd, 0);  } | 
