Argentum Online - Cliente
Referencia de la Clase TextInput

Input de texto. Más...

#include <text_input.h>

Métodos públicos

 TextInput (SDL_Rect render_area, SDL_Renderer *renderer, SDL_Color font_color, SDL_Color background_color, TTF_Font *font, uint64_t max_len=UINT64_MAX)
 Crea un objeto TextInput. Más...
 
void add_characters (const char *characters)
 Agrega caracteres al texto. Más...
 
void erase ()
 Borra un caracter del texto. Más...
 
void erase_all ()
 Borra todo el texto escrito. Más...
 
void render ()
 Renderiza el textbox y todo su texto. Más...
 
std::string get_text ()
 Devuelve el texto escrito. Más...
 
void toggle ()
 Activa/desactiva el cursor. Más...
 

Descripción detallada

Input de texto.

Documentación del constructor y destructor

◆ TextInput()

TextInput::TextInput ( SDL_Rect  render_area,
SDL_Renderer *  renderer,
SDL_Color  font_color,
SDL_Color  background_color,
TTF_Font *  font,
uint64_t  max_len = UINT64_MAX 
)

Crea un objeto TextInput.

Parámetros
render_areaArea de la pantalla donde se va a renderizar el input.
rendererRenderer con el cual se renderizara el input.
font_colorColor del texto.
background_colorColor del fondo del input.
fontFuente tipografica del texto.

Documentación de las funciones miembro

◆ add_characters()

void TextInput::add_characters ( const char *  characters)

Agrega caracteres al texto.

Parámetros
charactersCaracteres a agregar.

◆ erase()

void TextInput::erase ( )

Borra un caracter del texto.

Si el texto esta vacio, no hace nada.

◆ erase_all()

void TextInput::erase_all ( )

Borra todo el texto escrito.

◆ get_text()

std::string TextInput::get_text ( )

Devuelve el texto escrito.

Devuelve
std::string

◆ render()

void TextInput::render ( )

Renderiza el textbox y todo su texto.

◆ toggle()

void TextInput::toggle ( )

Activa/desactiva el cursor.


La documentación para esta clase fue generada a partir de los siguientes ficheros: