forked from jaildesigner-jailgames/jaildoctors_dilemma
Precarga de los ficheros .txt con los offsets del texto
This commit is contained in:
@@ -154,7 +154,7 @@ bool Menu::load(std::string file_path)
|
||||
// Crea el objeto text tan pronto como se pueda. Necesario para añadir items
|
||||
if (font_png != "" && font_txt != "" && !textAllocated)
|
||||
{
|
||||
text = new Text(font_png, asset->get(font_txt), resource, renderer);
|
||||
text = new Text(resource->getOffset(font_txt), resource->getTexture(font_png), renderer);
|
||||
textAllocated = true;
|
||||
}
|
||||
}
|
||||
@@ -977,6 +977,6 @@ void Menu::setText(std::string font_png, std::string font_txt)
|
||||
{
|
||||
if (!text)
|
||||
{
|
||||
text = new Text(font_png, font_txt, resource, renderer);
|
||||
text = new Text(resource->getOffset(font_txt), resource->getTexture(font_png), renderer);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user