Parametritzant colorets de varios llocs
This commit is contained in:
@@ -221,13 +221,13 @@ void HiScoreTable::createSprites()
|
||||
const int first_line = (param.game.height - size) / 2;
|
||||
|
||||
// Crea el sprite para el texto de cabecera
|
||||
header_ = std::make_unique<Sprite>(header_text->writeDXToTexture(TEXT_COLOR, Lang::getText("[HIGHSCORE_TABLE] CAPTION"), -2, background_fade_color_.getInverse().lighten(25)));
|
||||
header_ = std::make_unique<Sprite>(header_text->writeDXToTexture(TEXT_COLOR, Lang::getText("[HIGHSCORE_TABLE] CAPTION"), -2, background_fade_color_.inverse().lighten(25)));
|
||||
header_->setPosition(param.game.game_area.center_x - (header_->getWidth() / 2), first_line);
|
||||
|
||||
// Crea los sprites para las entradas en la tabla de puntuaciones
|
||||
const int animation = rand() % 4;
|
||||
const std::string sample_line(ENTRY_LENGHT + 3, ' ');
|
||||
auto sample_entry = std::make_unique<Sprite>(entry_text->writeDXToTexture(TEXT_SHADOW, sample_line, 1, ORANGE_COLOR, 1, SHADOW_TEXT_COLOR));
|
||||
auto sample_entry = std::make_unique<Sprite>(entry_text->writeDXToTexture(TEXT_SHADOW, sample_line, 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR));
|
||||
const auto entry_width = sample_entry->getWidth();
|
||||
for (int i = 0; i < MAX_NAMES; ++i)
|
||||
{
|
||||
@@ -242,7 +242,7 @@ void HiScoreTable::createSprites()
|
||||
}
|
||||
const auto line = table_position + Options::settings.hi_score_table.at(i).name + dots + score + one_cc;
|
||||
|
||||
entry_names_.emplace_back(std::make_shared<PathSprite>(entry_text->writeDXToTexture(TEXT_SHADOW, line, 1, ORANGE_COLOR, 1, SHADOW_TEXT_COLOR)));
|
||||
entry_names_.emplace_back(std::make_shared<PathSprite>(entry_text->writeDXToTexture(TEXT_SHADOW, line, 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR)));
|
||||
const int default_pos_x = (backbuffer_width - entry_width) / 2;
|
||||
const int pos_x = (i < 9) ? default_pos_x : default_pos_x - entry_text->getCharacterSize();
|
||||
const int pos_y = (i * space_between_lines) + first_line + space_between_header;
|
||||
@@ -392,10 +392,10 @@ Color HiScoreTable::getEntryColor(int counter_)
|
||||
void HiScoreTable::iniEntryColors()
|
||||
{
|
||||
entry_colors_.clear();
|
||||
entry_colors_.emplace_back(background_fade_color_.getInverse().lighten(75));
|
||||
entry_colors_.emplace_back(background_fade_color_.getInverse().lighten(50));
|
||||
entry_colors_.emplace_back(background_fade_color_.getInverse().lighten(25));
|
||||
entry_colors_.emplace_back(background_fade_color_.getInverse());
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(75));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(50));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(25));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse());
|
||||
}
|
||||
|
||||
// Hace brillar los nombres de la tabla de records
|
||||
|
||||
Reference in New Issue
Block a user