Erase unused variable following 77b81d8761
, clean two stray includes from c19f3608a5
.
Confess a wrong word in a comment inc9c82d9daf
and a typo in a comment in9985fcf5bd
. Differential Revision: https://code.wildfiregames.com/D2203 This was SVN commit r22720.
This commit is contained in:
parent
23e742f13c
commit
e82d0867b2
@ -989,7 +989,7 @@ void CGUI::Xeromyces_ReadSprite(XMBElement Element, CXeromyces* pFile)
|
||||
if (m_Sprites.find(name) != m_Sprites.end())
|
||||
LOGWARNING("GUI sprite name '%s' used more than once; first definition will be discarded", name.c_str());
|
||||
|
||||
// shared_ptr to link the effect to every sprite, faster than copy.
|
||||
// shared_ptr to link the effect to every image, faster than copy.
|
||||
std::shared_ptr<SGUIImageEffects> effects;
|
||||
|
||||
for (XMBElement child : Element.GetChildNodes())
|
||||
|
@ -16,22 +16,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
A GUI Sprite
|
||||
|
||||
--Overview--
|
||||
|
||||
A GUI Sprite, which is actually a collage of several
|
||||
sprites.
|
||||
|
||||
--Usage--
|
||||
|
||||
Used internally and declared in XML files, read documentations
|
||||
on how.
|
||||
|
||||
--More info--
|
||||
|
||||
Check GUI.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_CGUISPRITE
|
||||
@ -39,6 +25,7 @@ A GUI Sprite
|
||||
|
||||
#include "GUIbase.h"
|
||||
|
||||
#include "gui/GUIRenderer.h"
|
||||
#include "lib/res/graphics/ogl_tex.h"
|
||||
|
||||
#include <memory>
|
||||
@ -147,8 +134,6 @@ public:
|
||||
std::vector<SGUIImage*> m_Images;
|
||||
};
|
||||
|
||||
#include "GUIRenderer.h"
|
||||
|
||||
// An instance of a sprite, usually stored in IGUIObjects - basically a string
|
||||
// giving the sprite's name, but with some extra data to cache rendering
|
||||
// calculations between draw calls.
|
||||
@ -169,7 +154,7 @@ public:
|
||||
operator bool() const { return !m_SpriteName.empty(); };
|
||||
|
||||
/**
|
||||
* Returns this spirte if it has been set, otherwise the given fallback sprite.
|
||||
* Returns this sprite if it has been set, otherwise the given fallback sprite.
|
||||
*/
|
||||
const CGUISpriteInstance& operator||(const CGUISpriteInstance& fallback) const
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class CGUISprite;
|
||||
struct SGUIImageEffects;
|
||||
struct SGUIImage;
|
||||
|
||||
@ -65,12 +66,7 @@ namespace GUIRenderer
|
||||
DrawCalls(const DrawCalls&);
|
||||
DrawCalls& operator=(const DrawCalls&);
|
||||
};
|
||||
}
|
||||
|
||||
#include "gui/CGUISprite.h"
|
||||
|
||||
namespace GUIRenderer
|
||||
{
|
||||
void UpdateDrawCallCache(const CGUI* pGUI, DrawCalls& Calls, const CStr& SpriteName, const CRect& Size, int CellID, std::map<CStr, const CGUISprite*>& Sprites);
|
||||
|
||||
void Draw(DrawCalls& Calls, float Z);
|
||||
|
@ -129,7 +129,7 @@ PSRETURN GUI<T>::GetSetting(const IGUIObject* pObject, const CStr& Setting, T& V
|
||||
template <typename T>
|
||||
PSRETURN GUI<T>::SetSetting(IGUIObject* pObject, const CStr& Setting, T& Value, const bool& SkipMessage)
|
||||
{
|
||||
return SetSettingWrap(pObject, Setting, Value, SkipMessage,
|
||||
return SetSettingWrap(pObject, Setting, SkipMessage,
|
||||
[&pObject, &Setting, &Value]() {
|
||||
static_cast<CGUISetting<T>* >(pObject->m_Settings[Setting])->m_pSetting = std::move(Value);
|
||||
});
|
||||
@ -138,14 +138,14 @@ PSRETURN GUI<T>::SetSetting(IGUIObject* pObject, const CStr& Setting, T& Value,
|
||||
template <typename T>
|
||||
PSRETURN GUI<T>::SetSetting(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage)
|
||||
{
|
||||
return SetSettingWrap(pObject, Setting, Value, SkipMessage,
|
||||
return SetSettingWrap(pObject, Setting, SkipMessage,
|
||||
[&pObject, &Setting, &Value]() {
|
||||
static_cast<CGUISetting<T>* >(pObject->m_Settings[Setting])->m_pSetting = Value;
|
||||
});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
PSRETURN GUI<T>::SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage, const std::function<void()>& valueSet)
|
||||
PSRETURN GUI<T>::SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const bool& SkipMessage, const std::function<void()>& valueSet)
|
||||
{
|
||||
ENSURE(pObject != NULL);
|
||||
|
||||
|
@ -16,17 +16,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
GUI util
|
||||
|
||||
--Overview--
|
||||
|
||||
Contains help class GUI<>, which gives us templated
|
||||
parameter to all functions within GUI.
|
||||
|
||||
--More info--
|
||||
|
||||
Check GUI.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_GUIUTIL
|
||||
@ -189,7 +180,7 @@ private:
|
||||
* Changes the value of the setting by calling the valueSet functon that performs either a copy or move assignment.
|
||||
* Updates some internal data depending on the setting changed.
|
||||
*/
|
||||
static PSRETURN SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage, const std::function<void()>& valueSet);
|
||||
static PSRETURN SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const bool& SkipMessage, const std::function<void()>& valueSet);
|
||||
|
||||
// templated typedef of function pointer
|
||||
typedef void (IGUIObject::*void_Object_pFunction_argT)(const T& arg);
|
||||
|
Loading…
Reference in New Issue
Block a user