Added IGUIEnvironment::getHovered, returns the last hovered element.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4038 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2012-01-12 17:24:23 +00:00
parent fe73006f45
commit ade2a3938c
4 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Changes in 1.8 (??.??.2011)
- Add IGUIEnvironment::getHovered to get the element most recently known to be under the mouse cursor
- Add support for bsp brush entities. Written by Hendu.
- Add IGUIComboBox::setMaxSelectionRows and IGUIComboBox::getMaxSelectionRows

View File

@ -80,6 +80,10 @@ public:
/** \return Pointer to the element with focus. */
virtual IGUIElement* getFocus() const = 0;
//! Returns the element which was last under the mouse cursor
/** \return Pointer to the element under the mouse. */
virtual IGUIElement* getHovered() const = 0;
//! Removes the focus from an element.
/** Causes a EGET_ELEMENT_FOCUS_LOST event. If the event is absorbed
then the focus will not be changed.

View File

@ -296,6 +296,12 @@ IGUIElement* CGUIEnvironment::getFocus() const
return Focus;
}
//! returns the element last known to be under the mouse cursor
IGUIElement* CGUIEnvironment::getHovered() const
{
return Hovered;
}
//! removes the focus from an element
bool CGUIEnvironment::removeFocus(IGUIElement* element)
@ -397,7 +403,6 @@ bool CGUIEnvironment::OnEvent(const SEvent& event)
return ret;
}
//
void CGUIEnvironment::OnPostRender( u32 time )
{

View File

@ -192,6 +192,9 @@ public:
//! Returns the element with the focus
virtual IGUIElement* getFocus() const;
//! Returns the element last known to be under the mouse
virtual IGUIElement* getHovered() const;
//! Adds an element for fading in or out.
virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1);