Duplicada la font 04b_25 per a tindre versió gris i versió negra. La gris es la que es por modular amb colors.
Eliminada la font nokia que ja no s'estava utilitzant. Optimitzada la càrrega de fonts al permetre reutilitzar fitxers .txt de altres fonts
This commit is contained in:
@@ -315,23 +315,35 @@ void Resource::createTextures()
|
||||
}
|
||||
}
|
||||
|
||||
// Crea los objetos de texto
|
||||
void Resource::createText()
|
||||
{
|
||||
struct ResourceInfo
|
||||
{
|
||||
std::string key; // Identificador del recurso
|
||||
std::string textureFile; // Nombre del archivo de textura
|
||||
std::string textFile; // Nombre del archivo de texto
|
||||
|
||||
// Constructor para facilitar la creación de objetos ResourceInfo
|
||||
ResourceInfo(const std::string &k, const std::string &tFile, const std::string &txtFile)
|
||||
: key(k), textureFile(tFile), textFile(txtFile) {}
|
||||
};
|
||||
|
||||
std::cout << "\n>> CREATING TEXT_OBJECTS" << std::endl;
|
||||
|
||||
std::vector<std::pair<std::string, std::string>> resources = {
|
||||
{"04b_25", "04b_25.png"},
|
||||
{"04b_25_2x", "04b_25_2x.png"},
|
||||
{"04b_25_var01", "04b_25_var01.png"},
|
||||
{"8bithud", "8bithud.png"},
|
||||
{"nokia", "nokia.png"},
|
||||
{"smb2", "smb2.gif"}};
|
||||
std::vector<ResourceInfo> resources = {
|
||||
{"04b_25", "04b_25.png", "04b_25.txt"},
|
||||
{"04b_25_2x", "04b_25_2x.png", "04b_25_2x.txt"},
|
||||
{"04b_25_metal", "04b_25_metal.png", "04b_25.txt"},
|
||||
{"04b_25_grey", "04b_25_grey.png", "04b_25.txt"},
|
||||
{"8bithud", "8bithud.png", "8bithud.txt"},
|
||||
{"smb2", "smb2.gif", "smb2.txt"}};
|
||||
|
||||
for (const auto &resource : resources)
|
||||
{
|
||||
texts_.emplace_back(ResourceText(resource.first, std::make_shared<Text>(getTexture(resource.second), getTextFile(resource.first + ".txt"))));
|
||||
printWithDots("Text : ", resource.first, "[ DONE ]");
|
||||
texts_.emplace_back(ResourceText(resource.key, std::make_shared<Text>(
|
||||
getTexture(resource.textureFile),
|
||||
getTextFile(resource.textFile))));
|
||||
printWithDots("Text : ", resource.key, "[ DONE ]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user