aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
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()
);
}