Trabajando en el TITULO

This commit is contained in:
2022-09-28 14:03:45 +02:00
parent 1552f6385c
commit 2209ed5f97
7 changed files with 121 additions and 194 deletions

View File

@@ -13,11 +13,11 @@ Menu::Menu(SDL_Renderer *renderer, Asset *asset, Input *input, std::string file)
soundCancel = nullptr;
init();
if (file != "")
{
load(file);
}
reorganize();
}
Menu::~Menu()
@@ -56,7 +56,7 @@ bool Menu::load(std::string file_path)
// Indica si se ha creado ya el objeto de texto
bool textAllocated = false;
std::string filename = file_path.substr(file_path.find_last_of("\\/") + 1);
const std::string filename = file_path.substr(file_path.find_last_of("\\/") + 1);
std::string line;
std::ifstream file(file_path);
@@ -128,6 +128,9 @@ bool Menu::load(std::string file_path)
success = false;
}
// Reorganiza el menu con los valores recien cargados
//reorganize();
return success;
}
@@ -913,6 +916,6 @@ void Menu::setText(std::string font_png, std::string font_txt)
{
if (!text)
{
text = new Text(asset->get(font_png), asset->get(font_txt), renderer);
text = new Text(font_png, font_txt, renderer);
}
}