diff options
author | Alexander Tkachev | 2016-06-21 15:15:15 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-07-03 12:14:45 +0200 |
commit | d7278cc48b7fd9c1848da6402316663af2d0c7bd (patch) | |
tree | a94911c75c82d77d560e03423ceda956db8678d3 /gui/widget.cpp | |
parent | 34af71a8ef81db5fb4ee6d502df77a8c15540266 (diff) | |
download | scummvm-rg350-d7278cc48b7fd9c1848da6402316663af2d0c7bd.tar.gz scummvm-rg350-d7278cc48b7fd9c1848da6402316663af2d0c7bd.tar.bz2 scummvm-rg350-d7278cc48b7fd9c1848da6402316663af2d0c7bd.zip |
GUI: Prepare button to be clipped
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r-- | gui/widget.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index cc97988352..d17fabede7 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -324,8 +324,14 @@ void ButtonWidget::handleMouseDown(int x, int y, int button, int clickCount) { setPressedState(); } -void ButtonWidget::drawWidget() { - g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, getFlags()); +void ButtonWidget::drawWidget() { + int px = _boss->getAbsX(); + int py = _boss->getAbsY(); + g_gui.theme()->drawButtonClip( + Common::Rect(_x, _y, _x + _w, _y + _h), + Common::Rect(px, py, px + _boss->getWidth(), py + _boss->getHeight()), + _label, _state, getFlags() + ); } void ButtonWidget::setLabel(const Common::String &label) { |