Nova font de text per al text gran amb el doble de definició

This commit is contained in:
2024-11-04 20:28:19 +01:00
parent 2256ee46eb
commit 7b1c2a6005
5 changed files with 203 additions and 5 deletions

View File

@@ -255,7 +255,6 @@ void Resource::createTextures()
};
std::cout << "\n>> CREATING TEXTURES" << std::endl;
auto text = getText("04b_25");
// Tamaño normal
std::vector<NameAndText> strings = {
@@ -267,6 +266,7 @@ void Resource::createTextures()
NameAndText("game_text_stop", lang::getText(119)),
NameAndText("1000000_points", lang::getText(76))};
auto text = getText("04b_25");
for (const auto &s : strings)
{
textures_.emplace_back(ResourceTexture(s.name, text->writeToTexture(s.text, 1, -2)));
@@ -280,9 +280,10 @@ void Resource::createTextures()
NameAndText("congratulations", lang::getText(50)),
NameAndText("game_over", "Game Over")};
auto text2 = getText("04b_25_2x");
for (const auto &s : strings2X)
{
textures_.emplace_back(ResourceTexture(s.name, text->writeToTexture(s.text, 2, -2)));
textures_.emplace_back(ResourceTexture(s.name, text2->writeToTexture(s.text, 1, -4)));
printWithDots("Texture : ", s.name, "[ DONE ]");
}
}
@@ -294,6 +295,7 @@ void Resource::createText()
std::vector<std::pair<std::string, std::string>> resources = {
{"04b_25", "04b_25.png"},
{"04b_25_2x", "04b_25_2x.png"},
{"8bithud", "8bithud.png"},
{"nokia", "nokia.png"},
{"smb2", "smb2.gif"}};