From 3d636617d0781bdd477551a87f6b9fc60e0a4a1f Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Fri, 1 Jul 2016 14:25:05 +0600 Subject: GUI: Use clipping everywhere --- gui/widgets/edittext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/widgets/edittext.cpp') diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index bef90d4382..0a8725ac9e 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -97,7 +97,7 @@ void EditTextWidget::handleMouseDown(int x, int y, int button, int clickCount) { } void EditTextWidget::drawWidget() { - g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x+_w, _y+_h), 0, ThemeEngine::kWidgetBackgroundEditText); + g_gui.theme()->drawWidgetBackgroundClip(Common::Rect(_x, _y, _x+_w, _y+_h), getBossClipRect(), 0, ThemeEngine::kWidgetBackgroundEditText); // Draw the text adjustOffset(); @@ -105,7 +105,7 @@ void EditTextWidget::drawWidget() { const Common::Rect &r = Common::Rect(_x + 2 + _leftPadding, _y + 2, _x + _leftPadding + getEditRect().width() + 8, _y + _h); setTextDrawableArea(r); - g_gui.theme()->drawText(Common::Rect(_x + 2 + _leftPadding, _y + 2, _x + _leftPadding + getEditRect().width() + 2, _y + _h), _editString, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, -_editScrollOffset, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea); + g_gui.theme()->drawTextClip(Common::Rect(_x + 2 + _leftPadding, _y + 2, _x + _leftPadding + getEditRect().width() + 2, _y + _h), getBossClipRect(), _editString, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, -_editScrollOffset, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea); } Common::Rect EditTextWidget::getEditRect() const { -- cgit v1.2.3