Añadida la clase debug
This commit is contained in:
@@ -650,14 +650,14 @@ void Menu::render()
|
||||
// Establece el rectangulo de fondo del menu y el selector
|
||||
void Menu::setRectSize()
|
||||
{
|
||||
rectBG.rect.w = findWidth() + text->getCharacterWidth();
|
||||
rectBG.rect.h = findHeight() + text->getCharacterWidth();
|
||||
rectBG.rect.w = findWidth() + text->getCharacterSize();
|
||||
rectBG.rect.h = findHeight() + text->getCharacterSize();
|
||||
|
||||
// La posición X es la del menú menos medio caracter
|
||||
rectBG.rect.x = x - (text->getCharacterWidth() / 2);
|
||||
rectBG.rect.x = x - (text->getCharacterSize() / 2);
|
||||
|
||||
// La posición Y es la del menu menos la altura de medio caracter
|
||||
rectBG.rect.y = y - (text->getCharacterWidth() / 2);
|
||||
rectBG.rect.y = y - (text->getCharacterSize() / 2);
|
||||
|
||||
// Establecemos los valores del rectangulo del selector a partir de los valores del rectangulo de fondo
|
||||
setSelectorPos(selector.index);
|
||||
@@ -770,7 +770,7 @@ void Menu::setItemCaption(int index, std::string text)
|
||||
{
|
||||
item[index].label = text;
|
||||
item[index].rect.w = this->text->lenght(item[index].label);
|
||||
item[index].rect.h = this->text->getCharacterWidth();
|
||||
item[index].rect.h = this->text->getCharacterSize();
|
||||
reorganize();
|
||||
|
||||
const std::string texto = item[index].label + ":" + std::to_string(item[index].rect.w);
|
||||
|
||||
Reference in New Issue
Block a user