aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-22 15:02:46 +0600
committerEugene Sandulenko2016-07-03 12:16:43 +0200
commitfca0f0ed3496530fc0d63efdde9f32fb995cd671 (patch)
tree990ea3530f668feebb09e3915f85c60d7fb87e3c /gui/widget.cpp
parent8f2d35b0b89c4b8912df96ec3c403e00c85c5875 (diff)
downloadscummvm-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.cpp12
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()
);
}