From 4d29ce21d01176f523d6f3b05aefa1b011fc756c Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 27 Jan 2018 08:59:53 +0100 Subject: GUI: Unify clip and non-clip draw calls --- gui/widgets/edittext.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gui/widgets/edittext.cpp') diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index 97366741d0..b0e68985d1 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -97,7 +97,8 @@ void EditTextWidget::handleMouseDown(int x, int y, int button, int clickCount) { } void EditTextWidget::drawWidget() { - g_gui.theme()->drawWidgetBackgroundClip(Common::Rect(_x, _y, _x+_w, _y+_h), getBossClipRect(), 0, ThemeEngine::kWidgetBackgroundEditText); + g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x + _w, _y + _h), 0, + ThemeEngine::kWidgetBackgroundEditText); // Draw the text adjustOffset(); @@ -105,7 +106,10 @@ 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()->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); + 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); } Common::Rect EditTextWidget::getEditRect() const { -- cgit v1.2.3