aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
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/widgets
parent8f2d35b0b89c4b8912df96ec3c403e00c85c5875 (diff)
downloadscummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.tar.gz
scummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.tar.bz2
scummvm-rg350-fca0f0ed3496530fc0d63efdde9f32fb995cd671.zip
GUI: Make PopUpWidget clip
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/popup.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 0a1010f8fa..e157f29202 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -150,7 +150,7 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY)
void PopUpDialog::drawDialog() {
// Draw the menu border
- g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x+_w, _y+_h), 0);
+ g_gui.theme()->drawWidgetBackgroundClip(Common::Rect(_x, _y, _x+_w, _y+_h), _popUpBoss->getBossClipRect(), 0);
/*if (_twoColumns)
g_gui.vLine(_x + _w / 2, _y, _y + _h - 2, g_gui._color);*/
@@ -364,8 +364,11 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
// Draw a separator
g_gui.theme()->drawLineSeparator(Common::Rect(x, y, x+w, y+kLineHeight));
} else {
- g_gui.theme()->drawText(Common::Rect(x+1, y+2, x+w, y+2+kLineHeight), name, hilite ? ThemeEngine::kStateHighlight : ThemeEngine::kStateEnabled,
- Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, _leftPadding);
+ g_gui.theme()->drawTextClip(
+ Common::Rect(x+1, y+2, x+w, y+2+kLineHeight), _popUpBoss->getBossClipRect(),
+ name, hilite ? ThemeEngine::kStateHighlight : ThemeEngine::kStateEnabled,
+ Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, _leftPadding
+ );
}
}
@@ -470,7 +473,10 @@ void PopUpWidget::drawWidget() {
Common::String sel;
if (_selectedItem >= 0)
sel = _entries[_selectedItem].name;
- g_gui.theme()->drawPopUpWidget(Common::Rect(_x, _y, _x + _w, _y + _h), sel, _leftPadding, _state, Graphics::kTextAlignLeft);
+ g_gui.theme()->drawPopUpWidgetClip(
+ Common::Rect(_x, _y, _x + _w, _y + _h), getBossClipRect(),
+ sel, _leftPadding, _state, Graphics::kTextAlignLeft
+ );
}
} // End of namespace GUI