void CGUIControlGroup::UnfocusFromPoint(const CPoint &point) { CPoint controlCoords(point); m_transform.InverseTransformPosition(controlCoords.x, controlCoords.y); for (iControls it = m_children.begin(); it != m_children.end(); ++it) { CGUIControl *child = *it; child->UnfocusFromPoint(controlCoords - CPoint(m_posX, m_posY)); } CGUIControl::UnfocusFromPoint(point); }
void CGUIControlGroupList::UnfocusFromPoint(const CPoint &point) { float pos = 0; CPoint controlCoords(point); m_transform.InverseTransformPosition(controlCoords.x, controlCoords.y); for (iControls it = m_children.begin(); it != m_children.end(); ++it) { CGUIControl *child = *it; if (child->IsVisible()) { if (pos + Size(child) > m_offset && pos < m_offset + Size()) { // we're on screen CPoint offset = (m_orientation == VERTICAL) ? CPoint(m_posX, m_posY + pos - m_offset) : CPoint(m_posX + pos - m_offset, m_posY); child->UnfocusFromPoint(controlCoords - offset); } pos += Size(child) + m_itemGap; } } CGUIControl::UnfocusFromPoint(point); }