Adaptations to GD2.

git-svn-id: svn://localhost@478 8062f311-0dae-4547-b526-b8ab9ac864a5
This commit is contained in:
Florian
2011-08-06 13:42:13 +00:00
parent 947f14dc21
commit 5ff292478b
11 changed files with 16339 additions and 521 deletions
+11
View File
@@ -335,6 +335,17 @@ void TextObject::SetColor( unsigned int r, unsigned int g, unsigned int b )
text.SetColor(sf::Color(colorR, colorG, colorB, opacity));
}
void TextObject::SetColor(const std::string & colorStr)
{
vector < string > colors = SpliterStringToVector<string>(colorStr, ';');
if ( colors.size() < 3 ) return; //La couleur est incorrecte
SetColor( ToInt(colors[0]),
ToInt(colors[1]),
ToInt(colors[2]) );
}
void TextObject::SetOpacity(float val)
{
if ( val > 255 )