Add IGUIElement::isTrulyVisible which works like ISceneNode::isTrulyVisible.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4462 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2013-02-27 14:47:26 +00:00
parent dac64e00a7
commit 2659619e1a
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,7 @@
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Add IGUIElement::isTrulyVisible which works like ISceneNode::isTrulyVisible and checks for parent visibility as well.
- Improved DDS loader and added support for DXTn (DXT1-5) compressed textures in OpenGL and Direct3D9 drivers. - Improved DDS loader and added support for DXTn (DXT1-5) compressed textures in OpenGL and Direct3D9 drivers.
- Add function ISceneNode::getTransformedBoundingBoxEdges. - Add function ISceneNode::getTransformedBoundingBoxEdges.
- Improve automatic compiling under solaris (proposed by curaga) - Improve automatic compiling under solaris (proposed by curaga)

View File

@ -346,6 +346,20 @@ public:
return IsVisible; return IsVisible;
} }
//! Check whether the element is truly visible, taking into accounts its parents' visibility
/** \return true if the element and all its parents are visible,
false if this or any parent element is invisible. */
virtual bool isTrulyVisible() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
if(!IsVisible)
return false;
if(!Parent)
return true;
return Parent->isTrulyVisible();
}
//! Sets the visible state of this element. //! Sets the visible state of this element.
virtual void setVisible(bool visible) virtual void setVisible(bool visible)