Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: source/gui/GUIManager.cpp
- ===================================================================
- --- source/gui/GUIManager.cpp (revision 22755)
- +++ source/gui/GUIManager.cpp (working copy)
- @@ -377,11 +377,11 @@ void CGUIManager::TickObjects()
- for (const SGUIPage& p : pageStack)
- p.gui->TickObjects();
- }
- -void CGUIManager::Draw()
- +void CGUIManager::Draw() const
- {
- PROFILE3_GPU("gui");
- for (const SGUIPage& p : m_PageStack)
- p.gui->Draw();
- Index: source/gui/GUIManager.h
- ===================================================================
- --- source/gui/GUIManager.h (revision 22755)
- +++ source/gui/GUIManager.h (working copy)
- @@ -114,11 +114,11 @@ public:
- void TickObjects();
- /**
- * See CGUI::Draw; applies to @em all loaded pages.
- */
- - void Draw();
- + void Draw() const;
- /**
- * See CGUI::UpdateResolution; applies to @em all loaded pages.
- */
- void UpdateResolution();
- Index: source/gui/IGUIObject.cpp
- ===================================================================
- --- source/gui/IGUIObject.cpp (revision 22756)
- +++ source/gui/IGUIObject.cpp (working copy)
- @@ -126,11 +126,11 @@ void IGUIObject::AddSetting(const CStr&
- return;
- m_Settings[Name] = new CGUISetting<T>(*this, Name);
- }
- -bool IGUIObject::MouseOver()
- +bool IGUIObject::MouseOver() const
- {
- return m_CachedActualSize.PointInside(m_pGUI.GetMousePos());
- }
- bool IGUIObject::MouseOverIcon()
- @@ -423,19 +423,19 @@ JSObject* IGUIObject::GetJSObject()
- CreateJSObject();
- return m_JSObject.get();
- }
- -bool IGUIObject::IsHidden()
- +bool IGUIObject::IsHidden() const
- {
- // Statically initialise some strings, so we don't have to do
- // lots of allocation every time this function is called
- static const CStr strHidden("hidden");
- return GUI<bool>::GetSetting(this, strHidden);
- }
- -bool IGUIObject::IsHiddenOrGhost()
- +bool IGUIObject::IsHiddenOrGhost() const
- {
- static const CStr strGhost("ghost");
- return IsHidden() || GUI<bool>::GetSetting(this, strGhost);
- }
- Index: source/gui/IGUIObject.h
- ===================================================================
- --- source/gui/IGUIObject.h (revision 22756)
- +++ source/gui/IGUIObject.h (working copy)
- @@ -76,11 +76,11 @@ public:
- * an object from CButton, which changes only this
- * to checking the circle that "size" makes.
- *
- * @return true if mouse is hovering
- */
- - virtual bool MouseOver();
- + virtual bool MouseOver() const;
- /**
- * Test if mouse position is over an icon
- */
- virtual bool MouseOverIcon();
- @@ -130,11 +130,11 @@ public:
- void AddChild(IGUIObject* pChild);
- /**
- * Return all child objects of the current object.
- */
- - std::vector<IGUIObject*>& GetChildren() { return m_Children; }
- + const std::vector<IGUIObject*>& GetChildren() const { return m_Children; }
- //@}
- //--------------------------------------------------------
- /** @name Settings Management */
- //--------------------------------------------------------
- @@ -149,16 +149,16 @@ public:
- bool SettingExists(const CStr& Setting) const;
- /**
- * Returns whether this is object is set to be hidden.
- */
- - bool IsHidden();
- + bool IsHidden() const;
- /**
- * Returns whether this object is set to be hidden or ghost.
- */
- - bool IsHiddenOrGhost();
- + bool IsHiddenOrGhost() const;
- /**
- * All sizes are relative to resolution, and the calculation
- * is not wanted in real time, therefore it is cached, update
- * the cached size with this function.
- @@ -244,11 +244,11 @@ public:
- * Calls an IGUIObject member function recursively on this object and its children.
- * Aborts recursion at IGUIObjects that have the isRestricted function return true.
- * The arguments of the callback function must be references.
- */
- template<typename... Args>
- - void RecurseObject(bool(IGUIObject::*isRestricted)(), void(IGUIObject::*callbackFunction)(Args... args), Args&&... args)
- + void RecurseObject(bool(IGUIObject::*isRestricted)() const, void(IGUIObject::*callbackFunction)(Args... args), Args&&... args)
- {
- if (this != m_pGUI.GetBaseObject())
- {
- if (isRestricted && (this->*isRestricted)())
- return;
- @@ -508,9 +508,9 @@ class CGUIDummyObject : public IGUIObjec
- public:
- CGUIDummyObject(CGUI& pGUI) : IGUIObject(pGUI) {}
- virtual void Draw() {}
- // Empty can never be hovered. It is only a category.
- - virtual bool MouseOver() { return false; }
- + virtual bool MouseOver() const { return false; }
- };
- #endif // INCLUDED_IGUIOBJECT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement