I think I found a decent solution with this simple function:
This traverses each parent in a chain up to the topmost parent comparing the visibility with the current object. This is the first time I've ever found a use for recursion!Code:bool getParentVisible(void) { if (m_parent) { return m_parent->getParentVisible() && m_visible; } else return m_visible; }




Reply With Quote
