mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-25 21:06:12 +01:00
Added missing sfText_SetColor and sfText_GetColor
This commit is contained in:
1 parent
c54975288f
commit
a5d6bdb4f9
1 file changed
+23
@@ -215,6 +215,13 @@ void sfText_SetStyle(sfText* text, sfUint32 style)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfText_SetColor(sfText* text, sfColor color)
|
||||
{
|
||||
CSFML_CALL(text, SetColor(sf::Color(color.r, color.g, color.b, color.a)));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
const char* sfText_GetString(const sfText* text)
|
||||
{
|
||||
@@ -258,6 +265,22 @@ sfUint32 sfText_GetStyle(const sfText* text)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfColor sfText_GetColor(const sfText* text)
|
||||
{
|
||||
sfColor color = {0, 0, 0, 0};
|
||||
CSFML_CHECK_RETURN(text, color);
|
||||
|
||||
sf::Color sfmlColor = text->This.GetColor();
|
||||
color.r = sfmlColor.r;
|
||||
color.g = sfmlColor.g;
|
||||
color.b = sfmlColor.b;
|
||||
color.a = sfmlColor.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfText_FindCharacterPos(const sfText* text, size_t index, float* x, float* y)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user