diff options
author | Alexander Tkachev | 2016-06-22 15:02:46 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-07-03 12:16:43 +0200 |
commit | fca0f0ed3496530fc0d63efdde9f32fb995cd671 (patch) | |
tree | 990ea3530f668feebb09e3915f85c60d7fb87e3c /gui/widget.cpp | |
parent | 8f2d35b0b89c4b8912df96ec3c403e00c85c5875 (diff) | |
download | scummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.tar.gz scummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.tar.bz2 scummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.zip |
GUI: Make PopUpWidget clip
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r-- | gui/widget.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index d17fabede7..ed7cf93d7b 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -280,11 +280,8 @@ void StaticTextWidget::setAlign(Graphics::TextAlign align) { void StaticTextWidget::drawWidget() { - int px = _boss->getAbsX(); - int py = _boss->getAbsY(); g_gui.theme()->drawTextClip( - Common::Rect(_x, _y, _x+_w, _y+_h), - Common::Rect(px, py, px + _boss->getWidth(), py + _boss->getHeight()), + Common::Rect(_x, _y, _x+_w, _y+_h), getBossClipRect(), _label, _state, _align, ThemeEngine::kTextInversionNone, 0, true, _font ); } @@ -324,12 +321,9 @@ void ButtonWidget::handleMouseDown(int x, int y, int button, int clickCount) { setPressedState(); } -void ButtonWidget::drawWidget() { - int px = _boss->getAbsX(); - int py = _boss->getAbsY(); +void ButtonWidget::drawWidget() { g_gui.theme()->drawButtonClip( - Common::Rect(_x, _y, _x + _w, _y + _h), - Common::Rect(px, py, px + _boss->getWidth(), py + _boss->getHeight()), + Common::Rect(_x, _y, _x + _w, _y + _h), getBossClipRect(), _label, _state, getFlags() ); } |