mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
GUI: Fix container widgets not receiving events
This commit is contained in:
parent
bb2f218fa1
commit
f7a4b74130
@ -748,7 +748,10 @@ bool ContainerWidget::containsWidget(Widget *w) const {
|
||||
}
|
||||
|
||||
Widget *ContainerWidget::findWidget(int x, int y) {
|
||||
return findWidgetInChain(_firstWidget, x, y);
|
||||
Widget *w = findWidgetInChain(_firstWidget, x, y);
|
||||
if (w)
|
||||
return w;
|
||||
return this;
|
||||
}
|
||||
|
||||
void ContainerWidget::removeWidget(Widget *widget) {
|
||||
|
@ -153,7 +153,10 @@ bool ScrollContainerWidget::containsWidget(Widget *w) const {
|
||||
Widget *ScrollContainerWidget::findWidget(int x, int y) {
|
||||
if (_verticalScroll->isVisible() && x >= _w - _verticalScroll->getWidth())
|
||||
return _verticalScroll;
|
||||
return Widget::findWidgetInChain(_firstWidget, x + _scrolledX, y + _scrolledY);
|
||||
Widget *w = Widget::findWidgetInChain(_firstWidget, x + _scrolledX, y + _scrolledY);
|
||||
if (w)
|
||||
return w;
|
||||
return this;
|
||||
}
|
||||
|
||||
Common::Rect ScrollContainerWidget::getClipRect() const {
|
||||
|
Loading…
Reference in New Issue
Block a user