class
#include <Spore ModAPI/Spore/UTFWin/Image.h>
Image A layout element that represents an image.
This class might only represent a portion of the entire image file, since it can use UV coordinates.
Base classes
- class ILayoutElement
- This class represents an element that is part of a user interfaces.
Public types
- enum ImageTypeIDs { kTypePNG = 0x2F7D0004 }
Public static variables
Public static functions
- static auto GetImage(const ResourceKey& name, ImagePtr& dst, bool arg_8 = false, int height = -1, int width = -1) -> bool
- Creates an UTFWin::
Image instance with the image extracted from the file specified. - static auto SetBackground(IWindow* pWindow, Image* pImage, int imageIndex = -1) -> bool
- Changes the drawable of the given window to display the specified image.
- static auto SetBackgroundByKey(IWindow* pWindow, const ResourceKey& imageName, int imageIndex = -1) -> bool
- Changes the drawable of the given window to display the specified image.
Constructors, destructors, conversion operators
Public functions
- 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 GetTexCoords() const -> const Math::
Rectangle& -
auto GetDimensions() const -> const Math::
Dimensions&
Protected variables
Function documentation
static bool UTFWin:: Image:: SetBackground(IWindow* pWindow,
Image* pImage,
int imageIndex = -1)
Changes the drawable of the given window to display the specified image.
Parameters | |
---|---|
pWindow | The IWindow whose drawable will change. |
pImage | The image that will be displayed in the window. |
imageIndex |
Optionally, the index of the image can be specified (in the case you want to use a StdDrawable).
The method will try to use the existing drawable of the window; if there's no drawable or it's not an StdDrawable or an ImageDrawable, one will be created; by default an ImageDrawable will be created, unless an image index is specified.
static bool UTFWin:: Image:: SetBackgroundByKey(IWindow* pWindow,
const ResourceKey& imageName,
int imageIndex = -1)
Changes the drawable of the given window to display the specified image.
Parameters | |
---|---|
pWindow | The IWindow whose drawable will change. |
imageName | The ResourceKey that points to the image file that will be displayed in the window. |
imageIndex |
Optionally, the index of the image can be specified (in the case you want to use a StdDrawable).
The method will try to use the existing drawable of the window; if there's no drawable or it's not an StdDrawable or an ImageDrawable, one will be created; by default an ImageDrawable will be created, unless an image index is specified.
To detour this method, you must use GetAddress(Image, SetBackground_