Commit 2659619e authored by cutealien's avatar cutealien

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
parent dac64e00
-------------------------- --------------------------
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)
......
...@@ -346,6 +346,20 @@ public: ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment