Argentum Online - Cliente
chat.h
1
#ifndef __CHAT_H
2
#define __CHAT_H
3
4
#include "../../engine/UI/text_box.h"
5
#include "../../engine/UI/text_input.h"
6
#include "SDL2/SDL_ttf.h"
7
12
class
Chat
{
13
private
:
14
TextInput
text_input;
15
TextBox
text_box;
16
17
public
:
27
Chat
(SDL_Rect chat_area,
int
nlines, SDL_Renderer* renderer,
28
TTF_Font* font);
29
~
Chat
();
30
36
void
add_characters
(
const
char
* characters);
37
42
void
input_erase
();
43
44
/* Devuelve el texto escrito en el input y deja el input en blanco.*/
45
51
std::string
get_input_and_erase
();
52
58
void
print_line
(std::string line);
59
64
void
render
();
65
70
void
toggle
();
71
};
72
73
#endif
Chat::render
void render()
Renderiza el chat.
Definition:
chat.cpp:36
Chat
Chat del juego.
Definition:
chat.h:12
Chat::add_characters
void add_characters(const char *characters)
Agrega caracteres al input box del chat.
Definition:
chat.cpp:18
Chat::Chat
Chat(SDL_Rect chat_area, int nlines, SDL_Renderer *renderer, TTF_Font *font)
Crea un objeto Chat.
Definition:
chat.cpp:5
Chat::print_line
void print_line(std::string line)
Imprime una linea en el chat.
Definition:
chat.cpp:32
Chat::get_input_and_erase
std::string get_input_and_erase()
Devuelve el texto ingresado en el input, y lo borra.
Definition:
chat.cpp:26
Chat::input_erase
void input_erase()
Borra un caracter del input de texto.
Definition:
chat.cpp:22
Chat::toggle
void toggle()
Activa / desactiva el cursor del chat.
Definition:
chat.cpp:41
TextInput
Input de texto.
Definition:
text_input.h:14
TextBox
Caja de texto. Usada en el chat.
Definition:
text_box.h:14
client
views
game_view
chat.h
Generado por
1.8.19