GUI: Unify clip and non-clip draw calls

This commit is contained in:
Bastien Bouclet 2018-01-27 08:59:53 +01:00
parent dcfac42bb3
commit 4d29ce21d0
18 changed files with 156 additions and 573 deletions

View file

@ -203,11 +203,7 @@ void ScrollBarWidget::drawWidget() {
state = ThemeEngine::kScrollbarStateSlider;
}
Common::Rect clipRect = getBossClipRect();
//scrollbar is not a usual child of ScrollContainerWidget, so it gets this special treatment
if (dynamic_cast<ScrollContainerWidget *>(_boss))
clipRect.right += _w;
g_gui.theme()->drawScrollbarClip(Common::Rect(_x, _y, _x+_w, _y+_h), clipRect, _sliderPos, _sliderHeight, state, _state);
g_gui.theme()->drawScrollbar(Common::Rect(_x, _y, _x + _w, _y + _h), _sliderPos, _sliderHeight, state);
}
} // End of namespace GUI