diff --git a/include/IGUIEnvironment.h b/include/IGUIEnvironment.h index b4262515..e2b89cc1 100644 --- a/include/IGUIEnvironment.h +++ b/include/IGUIEnvironment.h @@ -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. */ diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index 3c9b7d84..de804b28 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -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) @@ -941,7 +941,7 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) { if (!(*it)->isSubElement()) { - writer->writeLineBreak(); + writer->writeLineBreak(); writeGUIElement(writer, (*it)); } } diff --git a/source/Irrlicht/CGUIEnvironment.h b/source/Irrlicht/CGUIEnvironment.h index dd317250..e6ddb550 100644 --- a/source/Irrlicht/CGUIEnvironment.h +++ b/source/Irrlicht/CGUIEnvironment.h @@ -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_;