TETRIS: use new TextRenderer interface

This commit is contained in:
2021-01-30 16:48:40 +01:00
parent a818c567fc
commit b65b0bf034
3 changed files with 42 additions and 50 deletions
+3 -4
View File
@@ -18,9 +18,8 @@
std::vector< std::shared_ptr< SDLPP::RenderObject > > line_coliders{};
void updateScore( std::shared_ptr< SDLPP::Font > font ) {
g_score_texture->setText( *font, std::to_string( g_score ), colors["text"],
colors["text_out"], 0.1 );
void updateScore() {
g_score_texture->changeText( std::to_string( g_score ) );
}
void doInput() {
@@ -131,7 +130,7 @@ int main() {
g_checked_line = false;
}
if ( g_update_score ) {
updateScore( g_font );
updateScore();
g_update_score = false;
}
if ( g_update_colors ) {