TETRIS: Use FontConfiguration
This commit is contained in:
+12
-3
@@ -414,6 +414,12 @@ void updateSize() {
|
||||
}
|
||||
}
|
||||
|
||||
void updateBlocks() {
|
||||
for ( auto &x : g_main_scene->getObjects( { BRICK_ID, SHADOW_ID } ) ) {
|
||||
x->specialAction( PIECE_ACTION_UPDATE_BLOCK );
|
||||
}
|
||||
}
|
||||
|
||||
void updateColors() {
|
||||
for ( auto &x : g_main_scene->getObjects( { BRICK_ID, SHADOW_ID } ) ) {
|
||||
x->specialAction( PIECE_ACTION_UPDATE_COLOR );
|
||||
@@ -430,9 +436,12 @@ void updateColors() {
|
||||
for ( auto &x : g_main_scene->getObjects( { LINE_ID } ) ) {
|
||||
x->setColor( colors["line"] );
|
||||
}
|
||||
for ( auto &x : g_main_scene->getObjects( { TEXT_ID } ) ) {
|
||||
static_cast< SDLPP::TextRenderer * >( x.get() )->setTextColor(
|
||||
g_font, colors["text"], colors["text_out"], 0.1 );
|
||||
if ( g_font_config != nullptr ) {
|
||||
g_font_config->setColor( colors["text"] );
|
||||
g_font_config->setOutlineColor( colors["text_out"] );
|
||||
for ( auto &x : g_main_scene->getObjects( { TEXT_ID } ) ) {
|
||||
x->updateSizeAndPosition();
|
||||
}
|
||||
}
|
||||
g_menu_options[g_menu_select]->setColor( colors["menu_item_background"] );
|
||||
g_game_over_options[g_game_over_select]->setColor(
|
||||
|
||||
Reference in New Issue
Block a user