Argentum Online - Cliente
sdl_bitmap_text.h
1 #ifndef __BITMAP_TEXT_H
2 #define __BITMAP_TEXT_H
3 #include "sdl_bitmap_font.h"
4 
9 class SDLBitmapText {
10  private:
11  SDLBitmapFont& font;
12  std::string text;
13  SDL_Color color;
14 
15  public:
23  SDLBitmapText(const std::string& text, SDLBitmapFont& font,
24  SDL_Color color);
25  ~SDLBitmapText();
26 
32  void render(SDL_Rect dest);
33 
39  void update_text(const std::string& new_text);
40 
46  int get_height();
47 
53  int get_width();
54 
55 };
56 
57 #endif
SDLBitmapText
Clase de texto a partir de una fuente bitmap.
Definition: sdl_bitmap_text.h:9
SDLBitmapFont
Fuente bitmap.
Definition: sdl_bitmap_font.h:9
SDLBitmapText::render
void render(SDL_Rect dest)
Renderiza el texto.
Definition: sdl_bitmap_text.cpp:11
SDLBitmapText::get_height
int get_height()
Devuelve la altura del texto.
Definition: sdl_bitmap_text.cpp:29
SDLBitmapText::get_width
int get_width()
Devuelve el ancho del texto.
Definition: sdl_bitmap_text.cpp:31
SDLBitmapText::update_text
void update_text(const std::string &new_text)
Cambia el texto.
Definition: sdl_bitmap_text.cpp:25
SDLBitmapText::SDLBitmapText
SDLBitmapText(const std::string &text, SDLBitmapFont &font, SDL_Color color)
Crea un objeto SDLBitmapText.
Definition: sdl_bitmap_text.cpp:5