diff options
author | Thierry Crozat | 2017-04-06 21:50:16 +0100 |
---|---|---|
committer | Thierry Crozat | 2017-04-06 21:55:28 +0100 |
commit | 91125bcbcd3cf9c0de9818f341a55f0e7f7b595c (patch) | |
tree | 4a5dbc6de8dc2df4d509568ae5aafec35404855f /gui/widgets/list.cpp | |
parent | 47d339509f2386bd10d3245592408090cd55d733 (diff) | |
download | scummvm-rg350-91125bcbcd3cf9c0de9818f341a55f0e7f7b595c.tar.gz scummvm-rg350-91125bcbcd3cf9c0de9818f341a55f0e7f7b595c.tar.bz2 scummvm-rg350-91125bcbcd3cf9c0de9818f341a55f0e7f7b595c.zip |
GUI: Add method to know if a widget contains a given widget
Diffstat (limited to 'gui/widgets/list.cpp')
-rw-r--r-- | gui/widgets/list.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index f6e5c67510..48d181e5ec 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -101,6 +101,12 @@ ListWidget::~ListWidget() { delete[] _textWidth; } +bool ListWidget::containsWidget(Widget *w) const { + if (w == _scrollBar || _scrollBar->containsWidget(w)) + return true; + return false; +} + Widget *ListWidget::findWidget(int x, int y) { if (x >= _w - _scrollBarWidth) return _scrollBar; |