Refactored Font and Text classes.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-03-24 04:49:14 -03:00
parent 97558261ae
commit bb0a6cacda
8 changed files with 263 additions and 326 deletions

View File

@@ -52,12 +52,12 @@ EE_MAIN_FUNC int main (int argc, char * argv []) {
fontTest = FontTrueType::New( "DejaVuSansMono" );
fontTest->loadFromFile( AppPath + "assets/fonts/DejaVuSansMono.ttf" );
fontTest->shrinkText( Txt, 24, false, 2, win->getWidth() - 96 );
text.setFont( fontTest );
text.setCharacterSize( 24 );
text.setAlign( TEXT_ALIGN_CENTER );
text.setString( Txt );
text.shrinkText( win->getWidth() - 96 );
// Set the font color to a substring of the text
// Create a gradient