#include <TextureBundle.h>
|
static std::string | Normalize (std::string name) |
|
◆ CTextureBundle() [1/2]
CTextureBundle::CTextureBundle |
( |
| ) |
|
◆ CTextureBundle() [2/2]
CTextureBundle::CTextureBundle |
( |
bool |
useXBT | ) |
|
|
explicit |
◆ ~CTextureBundle()
CTextureBundle::~CTextureBundle |
( |
| ) |
|
|
default |
◆ Close()
void CTextureBundle::Close |
( |
| ) |
|
◆ GetTexturesFromPath()
std::vector< std::string > CTextureBundle::GetTexturesFromPath |
( |
const std::string & |
path | ) |
|
◆ HasFile()
bool CTextureBundle::HasFile |
( |
const std::string & |
Filename | ) |
|
◆ LoadAnim()
bool CTextureBundle::LoadAnim |
( |
const std::string & |
filename, |
|
|
std::vector< std::pair< std::unique_ptr< CTexture >, int > > & |
textures, |
|
|
int & |
width, |
|
|
int & |
height, |
|
|
int & |
nLoops |
|
) |
| |
Load animation from bundle.
- Parameters
-
[in] | filename | name of the animation to load |
[out] | texture | vector of frames. Each frame is pair of a texture and the duration the frame |
[out] | width | width of the loaded textures |
[out] | height | height of the loaded textures |
- Returns
- true if animation was loaded
- Todo:
- With c++17 this should be changed to return a std::optional that's wrapping a struct containing the output values. Same for CTextureBundleXBT::LoadAnim.
◆ LoadTexture()
bool CTextureBundle::LoadTexture |
( |
const std::string & |
filename, |
|
|
std::unique_ptr< CTexture > & |
texture, |
|
|
int & |
width, |
|
|
int & |
height |
|
) |
| |
Load texture from bundle.
- Parameters
-
[in] | filename | name of the texture to load |
[out] | texture | holds the pointer to the texture after successful loading |
[out] | width | width of the loaded texture |
[out] | height | height of the loaded texture |
- Returns
- true if texture was loaded
- Todo:
- With c++17 this should be changed to return a std::optional that's wrapping a struct containing the output values. Same for CTextureBundleXBT::LoadTexture.
◆ Normalize()
std::string CTextureBundle::Normalize |
( |
std::string |
name | ) |
|
|
static |
◆ SetThemeBundle()
void CTextureBundle::SetThemeBundle |
( |
bool |
themeBundle | ) |
|
The documentation for this class was generated from the following files: