Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3356 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2010-07-17 18:29:11 +00:00
parent 011be981e7
commit 1641e03aac
2 changed files with 24 additions and 1 deletions

View File

@ -1,5 +1,7 @@
- Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name)
-----------------------------
Changes in 1.7.1 (05.07.2010) TA
Changes in 1.7.1 (05.07.2010) TA (eh... why 1.7.1? Trunk is for 1.8)
- BurningVideo
- add Normalmap Rendering ( one light only), pushed Burningvideo to 0.46
- add Stencil Shadow Rendering (one color only and 32 bit only), pushed Burningvideo to 0.47

View File

@ -538,6 +538,27 @@ public:
}
//! Moves a child to the back, so it's siblings are drawn on top of it
/** \return True if successful, false if not. */
virtual bool bringToBack(IGUIElement* child)
{
core::list<IGUIElement*>::Iterator it = Children.begin();
if (child == (*it)) // already there
return true;
for (; it != Children.end(); ++it)
{
if (child == (*it))
{
Children.erase(it);
Children.push_front(child);
return true;
}
}
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return false;
}
//! Returns list with children of this element
virtual const core::list<IGUIElement*>& getChildren() const
{