Commit 88581a4c authored by cutealien's avatar cutealien

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
parent 50f43d5a
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
/** \param element Pointer to the element which is tested. /** \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 \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. */ \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. //! Returns the current video driver.
/** \return Pointer to the video driver. */ /** \return Pointer to the video driver. */
......
...@@ -331,7 +331,7 @@ bool CGUIEnvironment::removeFocus(IGUIElement* element) ...@@ -331,7 +331,7 @@ bool CGUIEnvironment::removeFocus(IGUIElement* element)
//! Returns whether the element has focus //! 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; _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
if (element == Focus) if (element == Focus)
...@@ -941,7 +941,7 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) ...@@ -941,7 +941,7 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node)
{ {
if (!(*it)->isSubElement()) if (!(*it)->isSubElement())
{ {
writer->writeLineBreak(); writer->writeLineBreak();
writeGUIElement(writer, (*it)); writeGUIElement(writer, (*it));
} }
} }
......
...@@ -190,7 +190,7 @@ public: ...@@ -190,7 +190,7 @@ public:
virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_; virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_;
//! Returns if the element has focus //! 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 //! Returns the element with the focus
virtual IGUIElement* getFocus() const _IRR_OVERRIDE_; virtual IGUIElement* getFocus() const _IRR_OVERRIDE_;
......
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