MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / GetChildMouseHandler

Method GetChildMouseHandler

ogsr_engine/xrGame/ui/UIWindow.cpp:608–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606CUIWindow* CUIWindow::GetCurrentMouseHandler() { return GetTop()->GetChildMouseHandler(); }
607
608CUIWindow* CUIWindow::GetChildMouseHandler()
609{
610 CUIWindow* pWndResult;
611 WINDOW_LIST::reverse_iterator it = m_ChildWndList.rbegin();
612
613 for (; it != m_ChildWndList.rend(); ++it)
614 {
615 Frect wndRect = (*it)->GetWndRect();
616 // very strange code.... i can't understand difference between
617 // first and second condition. I Got It from OnMouse() method;
618 if (wndRect.in(cursor_pos))
619 {
620 if ((*it)->IsEnabled())
621 {
622 return pWndResult = (*it)->GetChildMouseHandler();
623 }
624 }
625 else if ((*it)->IsEnabled() && (*it)->CursorOverWindow())
626 {
627 return pWndResult = (*it)->GetChildMouseHandler();
628 }
629 }
630
631 return this;
632}
633
634//перемесчтить окно на вершину.
635// false если такого дочернего окна нет

Callers 1

Calls 5

rbeginMethod · 0.80
rendMethod · 0.80
GetWndRectMethod · 0.80
inMethod · 0.80
IsEnabledMethod · 0.45

Tested by

no test coverage detected