"How to play" added

This commit is contained in:
2021-04-05 19:07:33 +02:00
parent 36bb6b8fe8
commit 2330820a15
4 changed files with 95 additions and 36 deletions

View File

@@ -7,8 +7,8 @@
// Clase texto. Pinta texto en pantalla a partir de un bitmap
class Text
{
private:
Sprite *mSprite;// Objeto con los graficos para el texto
private:
Sprite *mSprite; // Objeto con los graficos para el texto
struct Offset
{
@@ -16,10 +16,10 @@ class Text
int y;
Uint8 w;
};
Offset mOffset[255];// Vector con las posiciones y ancho de cada letra
Offset mOffset[255]; // Vector con las posiciones y ancho de cada letra
Uint8 mType;// Indica si el texto es de anchura fija o variable
Uint8 mSize;// Altura del texto
Uint8 mType; // Indica si el texto es de anchura fija o variable
Uint8 mSize; // Altura del texto
public:
// Constructor
@@ -39,12 +39,15 @@ public:
// Escribe el texto con colores
void writeColored(int x, int y, std::string text, Uint8 R, Uint8 G, Uint8 B);
// Escribe el texto con sombra
// Escribe el texto con sombra
void writeShadowed(int x, int y, std::string text, Uint8 R, Uint8 G, Uint8 B);
// Escribe el texto centrado en un punto x y con kerning
void writeCentered(int x, int y, std::string text, int kerning = 0);
// Escribe el texto centrado en un punto x y con kerning
void writeCenteredAndColored(int x, int y, std::string text, int kerning = 0, Uint8 R = 255, Uint8 G = 255, Uint8 B = 255);
// Obtiene la longitud en pixels de una cadena
Uint16 lenght(std::string text, int kerning);
@@ -53,7 +56,7 @@ public:
// Establece el valor de la variable
void setType(Uint8 type);
// Obtiene el valor de la variable
Uint8 getSize();