Added missing sfText_SetColor and sfText_GetColor

This commit is contained in:
Laurent Gomila committed 2012-02-20 20:22:20 +01:00
1 parent c54975288f
commit a5d6bdb4f9
1 file changed
+23
+23
View File
@@ -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)
{