34 lines
495 B
C++
34 lines
495 B
C++
#pragma once
|
|
|
|
#include "sprite.h"
|
|
#include "const.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 |