fixed a bug in CGUIEnvironment::clear() reported by Jacky_J

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@718 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2007-06-18 04:15:12 +00:00
parent 4e79c0e25d
commit 125c58dfda
2 changed files with 16 additions and 1 deletions

View File

@ -159,7 +159,8 @@ GUI:
- XML bitmap fonts now load textures from the XML file directory rather than the current one.
- Fixed a small bug with click areas in combo boxes.
- Fixed a bug in clear() when an element was hovered or had focus
GUI Editor:

View File

@ -272,6 +272,20 @@ IOSOperator* CGUIEnvironment::getOSOperator()
//! clear all GUI elements
void CGUIEnvironment::clear()
{
// Remove the focus
if (Focus)
{
Focus->drop();
Focus = 0;
}
if (Hovered && Hovered != this)
{
Hovered->drop();
Hovered = 0;
}
// get the root's children in case the root changes in future
const core::list<IGUIElement*>& children = getRootGUIElement()->getChildren();