Added extra constructor to Texture to support passing std::string to Picture::create
parent
c94944bf10
commit
3e3e04089e
|
@ -67,6 +67,24 @@ namespace tgui
|
|||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Constructor that created the texture
|
||||
///
|
||||
/// @param id Id for the the image to load (for the default loader, the id is the filename)
|
||||
/// @param partRect Load only part of the image. Pass an empty rectangle if you want to load the full image
|
||||
/// @param middlePart Choose the middle part of the image for 9-slice scaling (relative to the part defined by partRect)
|
||||
///
|
||||
/// This constructor just calls the corresponding load function.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Texture(std::string id,
|
||||
const sf::IntRect& partRect = sf::IntRect(0, 0, 0, 0),
|
||||
const sf::IntRect& middlePart = sf::IntRect(0, 0, 0, 0))
|
||||
: Texture(sf::String{id}, partRect, middlePart)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Constructor that created the texture
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue