Files
jail_engine/units/on_screen_keyboard.cpp

43 lines
956 B
C++

#include "on_screen_keyboard.h"
// Constructor
OnScreenKeyboard::OnScreenKeyboard(SDL_Renderer *renderer, Input *input, string iconFile, string bitmapFile, string textFile, options_t *options)
{
// Inicializa variables
this->renderer = renderer;
this->options = options;
this->input = input;
// Crea objetos
iconTexture = new Texture(renderer, iconFile);
text = new Text(textFile, bitmapFile, renderer);
// Inicializa variables
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
}
// Destructor
OnScreenKeyboard::~OnScreenKeyboard()
{
// Libera la memoria de los objetos
if (iconTexture != nullptr)
{
delete iconTexture;
}
if (text != nullptr)
{
delete text;
}
}
// Actualiza la lógica del objeto
void OnScreenKeyboard::update()
{
}
// Dibuja el objeto en pantalla
void OnScreenKeyboard::render()
{
text->write(0,0,"ON_SCREEN_KEYBOARD");
}