diff options
Diffstat (limited to 'engines/m4/viewmgr.cpp')
-rw-r--r-- | engines/m4/viewmgr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/m4/viewmgr.cpp b/engines/m4/viewmgr.cpp index 8bd56fab61..b87ed7c91f 100644 --- a/engines/m4/viewmgr.cpp +++ b/engines/m4/viewmgr.cpp @@ -58,6 +58,14 @@ void RectList::addRect(const Common::Rect &rect) { push_back(rect); } +int RectList::find(const Common::Point &pt) { + for (int idx = 0; idx < size(); ++idx) { + if (this->operator [](idx).contains(pt.x, pt.y)) + return idx; + } + return -1; +} + //-------------------------------------------------------------------------- HotkeyList::HotkeyList(View *owner) { |