23#ifndef INCLUDED_CGUISPRITE
24#define INCLUDED_CGUISPRITE
127 void AddImage(std::unique_ptr<SGUIImage> image);
146 void Draw(
CGUI& pGUI,
CCanvas2D& canvas,
const CRect& Size, std::map<CStr, std::unique_ptr<const CGUISprite>>& Sprites)
const;
162 void SetName(
const CStr& SpriteName);
Definition: Canvas2D.h:36
This class represents a rectangle relative to a parent rectangle The value can be initialized from a ...
Definition: CGUISize.h:30
Definition: CGUISprite.h:137
MOVABLE(CGUISpriteInstance)
bool m_RoundCoordinates
Definition: CGUISprite.h:173
const CStr & GetName() const
Returns the sprite texture name.
Definition: CGUISprite.h:156
void Draw(CGUI &pGUI, CCanvas2D &canvas, const CRect &Size, std::map< CStr, std::unique_ptr< const CGUISprite > > &Sprites) const
Definition: CGUISprite.cpp:31
NONCOPYABLE(CGUISpriteInstance)
CGUISpriteInstance()
Definition: CGUISprite.cpp:45
GUIRenderer::DrawCalls m_DrawCallCache
Definition: CGUISprite.h:176
void SetName(const CStr &SpriteName)
Changes the texture name.
Definition: CGUISprite.cpp:59
void SetRoundCoordinates(const bool RoundCoordinates)
Sets the coordinates to be rounded to integer pixels.
Definition: CGUISprite.cpp:66
CStr m_SpriteName
Definition: CGUISprite.h:171
CRect m_CachedSize
Definition: CGUISprite.h:179
The GUI sprite, is actually several real sprites (images) like a collage.
Definition: CGUISprite.h:116
std::vector< std::unique_ptr< SGUIImage > > m_Images
List of images.
Definition: CGUISprite.h:130
void AddImage(std::unique_ptr< SGUIImage > image)
Adds an image to the sprite collage.
Definition: CGUISprite.cpp:26
CGUISprite()
Definition: CGUISprite.h:119
The main object that represents a whole GUI page.
Definition: CGUI.h:80
Rectangle class used for screen rectangles.
Definition: Rect.h:31
Definition: GUIRenderer.h:58
AddressMode
Definition: Sampler.h:39
Backend
Definition: Backend.h:28
Definition: Canvas2D.h:30
Same as the CColor class, but this one can also parse colors predefined in the GUI page (such as "yel...
Definition: CGUIColor.h:31
Definition: CGUISprite.h:43
CGUIColor m_SolidColor
Definition: CGUISprite.h:46
CGUIColor m_AddColor
Definition: CGUISprite.h:45
SGUIImageEffects()
Definition: CGUISprite.h:44
bool m_Greyscale
Definition: CGUISprite.h:47
A CGUISprite is actually a collage of several real sprites, this struct represents is such real sprit...
Definition: CGUISprite.h:55
CRect m_TexturePlacementInFile
Definition: CGUISprite.h:80
float m_FixedHAspectRatio
If non-zero, then the image's width will be adjusted when rendering so that the width:height ratio eq...
Definition: CGUISprite.h:86
bool m_RoundCoordinates
If true, the image's coordinates will be rounded to integer pixels when rendering,...
Definition: CGUISprite.h:92
std::shared_ptr< SGUIImageEffects > m_Effects
Definition: CGUISprite.h:100
Renderer::Backend::Sampler::AddressMode m_AddressMode
Texture address mode (REPEAT, CLAMP_TO_EDGE, etc).
Definition: CGUISprite.h:97
CGUIColor m_BackColor
Definition: CGUISprite.h:103
CGUISize m_Size
Definition: CGUISprite.h:72
CGUISize m_TextureSize
Definition: CGUISprite.h:75
VfsPath m_TextureName
Definition: CGUISprite.h:69
SGUIImage()
Definition: CGUISprite.h:58