update text2.cpp
This commit is contained in:
@@ -16,7 +16,7 @@ public:
|
||||
~Text2();
|
||||
|
||||
// Inicializador
|
||||
void init(LTexture *texture, SDL_Renderer *renderer, Uint8 type, Uint8 size);
|
||||
void init(LTexture *texture, SDL_Renderer *renderer, Uint8 height);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setPosX(int value);
|
||||
@@ -31,72 +31,45 @@ public:
|
||||
void setCaption(std::string text);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setWrittingSpeed(Uint16 value);
|
||||
void setSpeed(Uint16 value);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setEnabled(bool value);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool IsEnabled();
|
||||
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setEnabledTimer(Uint16 value);
|
||||
void setEnabledCounter(Uint16 value);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
Uint16 getEnabledTimer();
|
||||
Uint16 getEnabledCounter();
|
||||
|
||||
// Actualiza el objeto
|
||||
// Actualiza todas las variables del objeto
|
||||
void update();
|
||||
|
||||
// Dibuja el objeto en pantalla
|
||||
void render();
|
||||
|
||||
// Centra la cadena de texto a un punto X
|
||||
// Centra la cadena de texto respecto a un punto X
|
||||
void center(int x);
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Establece el valor de la variable mId
|
||||
void setId(int id);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setIntroEvents(Uint8 *value);
|
||||
|
||||
private:
|
||||
// Posicion X/Y donde empezar a escribir el texto
|
||||
int mPosX;
|
||||
int mPosY;
|
||||
|
||||
// Kerning del texto
|
||||
int mKerning;
|
||||
|
||||
// Texto para escribir
|
||||
std::string mCaption;
|
||||
|
||||
// Velocidad de escritura
|
||||
Uint16 mWrittingSpeed;
|
||||
|
||||
// Temporizador de escritura para cada caracter
|
||||
Uint16 mWrittingTimer;
|
||||
|
||||
// Posición del texto que se está escribiendo
|
||||
Uint16 mIndex;
|
||||
|
||||
// Longitud de la cadena a escribir
|
||||
Uint16 mLenght;
|
||||
|
||||
// Indica si se ha escrito todo el texto
|
||||
bool mWrittingCompleted;
|
||||
|
||||
// Indica si el objeto está habilitado
|
||||
bool mEnabled;
|
||||
|
||||
// Temporizador para deshabilitar el objeto
|
||||
Uint16 mEnabledTimer;
|
||||
|
||||
// Identificador
|
||||
int mId;
|
||||
|
||||
// Dirección del array de eventos donde notificar el estado
|
||||
Uint8 *mIntroEvents;
|
||||
bool mCompleted; // Indica si se ha escrito todo el texto
|
||||
bool mEnabled; // Indica si el objeto está habilitado
|
||||
int mId; // Identificador
|
||||
int mKerning; // Espacio entre caracteres
|
||||
int mPosX; // Posicion en el eje X donde empezar a escribir el texto
|
||||
int mPosY; // Posicion en el eje Y donde empezar a escribir el texto
|
||||
std::string mCaption; // Texto para escribir
|
||||
Uint16 mCounter; // Temporizador de escritura para cada caracter
|
||||
Uint16 mEnabledCounter; // Contador para deshabilitar el objeto
|
||||
Uint16 mIndex; // Indice a la posición dentro de la cadena de texto que se está escribiendo
|
||||
Uint16 mLenght; // Longitud de la cadena a escribir
|
||||
Uint16 mSpeed; // Velocidad de escritura
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user