Las clases text y menu ya acceden a resource

This commit is contained in:
2022-10-27 12:43:28 +02:00
parent 4133dfd7c9
commit 9d9d9d92f2
13 changed files with 51 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "sprite.h"
#include "resource.h"
#include "utils.h"
#ifndef TEXT_H
@@ -23,8 +24,9 @@ private:
};
// Objetos y punteros
Sprite *sprite; // Objeto con los graficos para el texto
Texture *texture; // Textura con los bitmaps del texto
Resource *resource; // Objeto con los recursos
Sprite *sprite; // Objeto con los graficos para el texto
Texture *texture; // Textura con los bitmaps del texto
// Variables
int boxWidth; // Anchura de la caja de cada caracter en el png
@@ -36,7 +38,7 @@ private:
public:
// Constructor
Text(std::string bitmapFile, std::string textFile, SDL_Renderer *renderer);
Text(std::string bitmapFile, std::string textFile, Resource *resource, SDL_Renderer *renderer);
// Destructor
~Text();