IGUIEnvironment::hasFocus can work with a const pointer.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4755 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2014-04-02 19:23:20 +00:00
parent 50f43d5a3d
commit 88581a4c42
3 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ public:
/** \param element Pointer to the element which is tested.
\param checkSubElements When true and focus is on a sub-element of element then it will still count as focused and return true
\return True if the element has focus, else false. */
virtual bool hasFocus(IGUIElement* element, bool checkSubElements=false) const = 0;
virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const = 0;
//! Returns the current video driver.
/** \return Pointer to the video driver. */

View File

@ -331,7 +331,7 @@ bool CGUIEnvironment::removeFocus(IGUIElement* element)
//! Returns whether the element has focus
bool CGUIEnvironment::hasFocus(IGUIElement* element, bool checkSubElements) const
bool CGUIEnvironment::hasFocus(const IGUIElement* element, bool checkSubElements) const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
if (element == Focus)

View File

@ -190,7 +190,7 @@ public:
virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_;
//! Returns if the element has focus
virtual bool hasFocus(IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_;
virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_;
//! Returns the element with the focus
virtual IGUIElement* getFocus() const _IRR_OVERRIDE_;