Rediseñada y optimizada la clase Instructions

This commit is contained in:
2024-07-05 11:34:55 +02:00
parent 2b628d2d61
commit 5e7212dfaa
5 changed files with 223 additions and 113 deletions

View File

@@ -86,11 +86,10 @@ void HiScoreTable::update()
void HiScoreTable::fillTexture()
{
// hay 27 letras - 7 de puntos quedan 20 caracteres 20 - nameLenght 0 numDots
const color_t orangeColor = {0xFF, 0x7A, 0x00};
const int maxNames = 10;
const int spaceBetweenHeader = 32;
const int spaceBetweenLines = text->getCharacterSize() * 2.0f;
const int size = spaceBetweenHeader + spaceBetweenLines * maxNames;
const int size = spaceBetweenHeader + spaceBetweenLines * (maxNames - 1) + text->getCharacterSize();
const int firstLine = (param->gameHeight - size) / 2;
// Pinta en el backbuffer el texto y los sprites