class
SporeStdDrawable
Base classes
- class StdDrawable
- The standard IDrawable for user interactive components.
Public static variables
Public static functions
- static auto SetWindowIcon(IWindow* pWindow, Image* pImage, int stateIndex = 0) -> bool
Constructors, destructors, conversion operators
- SporeStdDrawable()
- ~SporeStdDrawable() virtual
Public functions
- auto GetImageInfo(int stateIndex) -> SporeStdDrawableImageInfo*
- Gets the image information that is being used for the state specified.
- auto SetImageInfo(SporeStdDrawableImageInfo* pInfo, int stateIndex) -> bool
- Sets the image information that will be used for the state specified.
- auto SetIconImage(Image* pImage, int stateIndex) -> void
- auto GetScale() const -> Vector2 virtual
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t type) const -> void* override - auto SetSerializer(Serializer& dst) -> void override
-
auto GetProxyID() const -> uint32_
t override - Returns the ID that identifies this type of element in a SPUI file.
-
auto Paint(UIRenderer* pRenderer,
const Math::
Rectangle& area, const RenderParams& params) -> void override - Paints this drawable onto the given UIRenderer.
-
auto IsColliding(const Math::
Rectangle& area, const Math:: Point& point, RenderParams& params) -> bool override - Tells whether the point specified is colliding in this drawable or not.
- auto GetDimensions(Dimensions& dst, int state, int index) -> bool override
- Used to get the dimensions of an image contained in this drawable.
-
auto UseCollision(uint32_
t type, bool& dst) -> bool override - Tells whether the collision of a window should be handled by this drawable or not.
Protected variables
Function documentation
SporeStdDrawableImageInfo* UTFWin:: SporeStdDrawable:: GetImageInfo(int stateIndex)
Gets the image information that is being used for the state specified.
Parameters | |
---|---|
stateIndex | The index that corresponds to the desired state. |
bool UTFWin:: SporeStdDrawable:: SetImageInfo(SporeStdDrawableImageInfo* pInfo,
int stateIndex)
Sets the image information that will be used for the state specified.
Parameters | |
---|---|
pInfo | The SporeStdDrawableImageInfo to use. |
stateIndex | The index that corresponds to the desired state. |
Returns | True if the index is valid, false otherwise. |
void UTFWin:: SporeStdDrawable:: Paint(UIRenderer* pRenderer,
const Math:: Rectangle& area,
const RenderParams& params) override
Paints this drawable onto the given UIRenderer.
Parameters | |
---|---|
pRenderer | The UIRenderer where this must be drawn. |
area | The area of the window to draw. |
params | RenderParams that contain additional information (e.g. what image do draw, the current state, etc). |
bool UTFWin:: SporeStdDrawable:: IsColliding(const Math:: Rectangle& area,
const Math:: Point& point,
RenderParams& params) override
Tells whether the point specified is colliding in this drawable or not.
Parameters | |
---|---|
area | The area of the window that is using this drawable. |
point | The Point to check whether it collides or not. Its coordinates are relative to the window position. |
params | Additional information, probably unused. |
This method is useful for drawables that use hitmasks.
bool UTFWin:: SporeStdDrawable:: GetDimensions(Dimensions& dst,
int state,
int index) override
Used to get the dimensions of an image contained in this drawable.
Parameters | |
---|---|
dst out | The Dimensions where the result must be written. |
state | The current state flags of the window. |
index | The index of the image whose dimensions must be returned. |
Returns | True if the dimensions were got, false otherwise. |
bool UTFWin:: SporeStdDrawable:: UseCollision(uint32_ t type,
bool& dst) override
Tells whether the collision of a window should be handled by this drawable or not.
Parameters | |
---|---|
type | The type, usually kDefaultCollisionType. |
dst out | If the collision type is supported, whether it must be handled by this drawable or not. |
Returns | True if the collision type is supported (even if it's not handled by this drawable), false otherwise. |