mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Add a getter ofr retrieving a texture
This commit is contained in:
parent
32497b173b
commit
b321d915d3
@ -455,6 +455,16 @@ CPixmap::Cache (size_t channel, SDL_Surface * surface, Point totalDim)
|
||||
return true;
|
||||
}
|
||||
|
||||
SDL_Texture *
|
||||
CPixmap::getTexture (size_t channel)
|
||||
{
|
||||
auto it = this->m_SDLTextureInfo.find (channel);
|
||||
if (it == this->m_SDLTextureInfo.end ())
|
||||
return nullptr;
|
||||
|
||||
return it->second.texture;
|
||||
}
|
||||
|
||||
// Modifie la r�gion de clipping.
|
||||
|
||||
void
|
||||
|
@ -69,8 +69,9 @@ public:
|
||||
Point iconDim, Mode mode = FIX, size_t chBackWide = CHNONE);
|
||||
bool Cache (size_t channel, const std::string & pFilename, Point totalDim);
|
||||
bool Cache (size_t channel, SDL_Surface * surface, Point totalDim);
|
||||
void SetClipping (Rect clip);
|
||||
Rect GetClipping ();
|
||||
SDL_Texture * getTexture (size_t channel);
|
||||
void SetClipping (Rect clip);
|
||||
Rect GetClipping ();
|
||||
|
||||
bool IsIconPixel (size_t channel, Sint32 rank, Point pos);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user