33 lines
437 B
C++
33 lines
437 B
C++
#pragma once
|
|
|
|
#include "sprite.h"
|
|
|
|
#ifndef TEXT_H
|
|
#define TEXT_H
|
|
|
|
//Text class
|
|
class Text
|
|
{
|
|
public:
|
|
//Constructor
|
|
Text();
|
|
|
|
//Inicializador
|
|
void init(LTexture *texture);
|
|
|
|
//Escribe el texto en pantalla
|
|
void write(int x, int y, std::string text);
|
|
|
|
private:
|
|
//Objeto con los graficos para el texto
|
|
Sprite mSprite;
|
|
|
|
//Coordenadas dentro del PNG para cada código ascii
|
|
struct Offset
|
|
{
|
|
int x;
|
|
int y;
|
|
} mOffset[255];
|
|
};
|
|
|
|
#endif |