Caja de texto. Usada en el chat. Más...
#include <text_box.h>
Métodos públicos | |
TextBox (SDL_Rect render_area, SDL_Renderer *renderer, int nlines, SDL_Color font_color, SDL_Color background_color, TTF_Font *font) | |
Crea un objeto TextBox. Más... | |
void | erase_all () |
Borra todo el texto del textbox. Más... | |
void | add_line (std::string string) |
Agrega una nueva linea al textbox. Más... | |
void | render () |
Renderiza el textbox. Más... | |
Caja de texto. Usada en el chat.
TextBox::TextBox | ( | SDL_Rect | render_area, |
SDL_Renderer * | renderer, | ||
int | nlines, | ||
SDL_Color | font_color, | ||
SDL_Color | background_color, | ||
TTF_Font * | font | ||
) |
Crea un objeto TextBox.
render_area | Area donde se va a renderizar el textbox. |
renderer | Renderer con el cual se va a renderizar el textbox. |
nlines | Cantidad de lineas del textbox. |
font_color | Color del texto. |
background_color | Color de fondo. |
font | Fuente tipografica del texto. |
void TextBox::add_line | ( | std::string | string | ) |
Agrega una nueva linea al textbox.
string | Linea a agregar. |
void TextBox::erase_all | ( | ) |
Borra todo el texto del textbox.
void TextBox::render | ( | ) |
Renderiza el textbox.