afegit i parametritzat outline per als textos dels items
This commit is contained in:
@@ -616,33 +616,42 @@ void Resource::createTextTextures() {
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> CREATING TEXTURES");
|
||||
|
||||
// Texturas de tamaño normal
|
||||
std::vector<NameAndText> strings = {
|
||||
// Texturas de tamaño normal con outline
|
||||
std::vector<NameAndText> strings1 = {
|
||||
{"game_text_1000_points", "1.000"},
|
||||
{"game_text_2500_points", "2.500"},
|
||||
{"game_text_5000_points", "5.000"},
|
||||
{"game_text_powerup", Lang::getText("[GAME_TEXT] 4")},
|
||||
{"game_text_one_hit", Lang::getText("[GAME_TEXT] 5")},
|
||||
{"game_text_stop", Lang::getText("[GAME_TEXT] 6")},
|
||||
{"game_text_stop", Lang::getText("[GAME_TEXT] 6")}};
|
||||
|
||||
auto text1 = getText("04b_25_enhanced");
|
||||
for (const auto &s : strings1) {
|
||||
textures_.emplace_back(s.name, text1->writeDXToTexture(Text::STROKE, s.text, -2, Colors::NO_COLOR_MOD, 1, param.game.item_text_outline_color));
|
||||
printWithDots("Texture : ", s.name, "[ DONE ]");
|
||||
}
|
||||
|
||||
// Texturas de tamaño normal
|
||||
std::vector<NameAndText> strings2 = {
|
||||
{"game_text_1000000_points", Lang::getText("[GAME_TEXT] 8")}};
|
||||
|
||||
auto text = getText("04b_25_enhanced");
|
||||
for (const auto &s : strings) {
|
||||
textures_.emplace_back(s.name, text->writeDXToTexture(Text::STROKE, s.text, -2, NO_TEXT_COLOR, 1, Color(255, 255, 0, 255)));
|
||||
auto text2 = getText("04b_25");
|
||||
for (const auto &s : strings2) {
|
||||
textures_.emplace_back(s.name, text2->writeDXToTexture(Text::STROKE, s.text, -2, Colors::NO_COLOR_MOD, 1, param.game.item_text_outline_color));
|
||||
printWithDots("Texture : ", s.name, "[ DONE ]");
|
||||
}
|
||||
|
||||
// Texturas de tamaño doble
|
||||
std::vector<NameAndText> strings2_x = {
|
||||
std::vector<NameAndText> strings3 = {
|
||||
{"game_text_100000_points", "100.000"},
|
||||
{"game_text_get_ready", Lang::getText("[GAME_TEXT] 7")},
|
||||
{"game_text_last_stage", Lang::getText("[GAME_TEXT] 3")},
|
||||
{"game_text_congratulations", Lang::getText("[GAME_TEXT] 1")},
|
||||
{"game_text_game_over", "Game Over"}};
|
||||
|
||||
auto text2 = getText("04b_25_2x");
|
||||
for (const auto &s : strings2_x) {
|
||||
textures_.emplace_back(s.name, text2->writeToTexture(s.text, 1, -4));
|
||||
auto text3 = getText("04b_25_2x");
|
||||
for (const auto &s : strings3) {
|
||||
textures_.emplace_back(s.name, text3->writeToTexture(s.text, 1, -4));
|
||||
printWithDots("Texture : ", s.name, "[ DONE ]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user