Reestructurados los ficheros en carpetas
This commit is contained in:
34
source/text.h
Normal file
34
source/text.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user