Singleton responisble for loading and retrieving images.
More...
#include <ImageManager.h>
|
static void | Load (const MapKey &key, Texture *tex) |
| Image Model with KEY and TEXTURE.
|
|
static void | Load (const MapKey &key, Texture *tex, Rect *r) |
| Load Image with KEY, TEXTURE and R.
|
|
static Image * | GetImage (const MapKey &key) |
| Returns image pointer with given KEY.
|
|
static Image * | GetImage (DefaultImages key) |
| Returns image pointer from DEFAULTIMAGES.
|
|
|
using | MapKey = std::string |
| KEYS stored as STRINGS.
|
|
Singleton responisble for loading and retrieving images.
◆ MapKey
◆ DefaultImages
Collection of Preloaded Images.
◆ GetImage() [1/2]
static Image * ImageManager::GetImage |
( |
const MapKey & | key | ) |
|
|
static |
Returns image pointer with given KEY.
A function that returns a image pointer based on a user generated key. Checks if key already exists.
- Parameters
-
- Returns
- Image*
◆ GetImage() [2/2]
Returns image pointer from DEFAULTIMAGES.
A function that returns a image pointer based on the enum class DefaultModels.
- Parameters
-
- Returns
- Image*
◆ Load() [1/2]
static void ImageManager::Load |
( |
const MapKey & | key, |
|
|
Texture * | tex ) |
|
static |
Image Model with KEY and TEXTURE.
A function that creates an image based on a given texture. Images center gets defaulted to the center of the texture. Width and height are defaulted to the texture's width and height. Checks for repeated key use.
- Parameters
-
◆ Load() [2/2]
static void ImageManager::Load |
( |
const MapKey & | key, |
|
|
Texture * | tex, |
|
|
Rect * | r ) |
|
static |
Load Image with KEY, TEXTURE and R.
A function that creates an image based on a given texture. R's x and y represent the image's center. R's Z and W represent the width and height in pixels. Checks for repeated key use.
- Parameters
-