#include <textbox.h>

Public Member Functions | |
| TextBox () | |
| Default constructor. | |
| void | Init (Types::Screen::selector screen, int bgid, FT_Face face, int size, int x, int y, int width=0, int height=0) |
| int | size () const |
| Get the font size. | |
| int | x () const |
| Get the X position of the left side. | |
| int | y () const |
| Get the Y position of the bottom side. | |
| int | width () const |
| Get the width of the box in pixels. | |
| int | height () const |
| Get the height of the box in pixels. | |
| bool | floats () const |
| Get whether the text box floats or not. | |
| bool | independent () const |
| Get whether the text box is independent or not. | |
| bool | visible () const |
| Get whether the text will be visible or not. | |
| std::string | text () const |
| Get the text. | |
| Types::Screen::selector | screen () const |
| Get the screen where the textbox is. | |
| int | bgid () const |
| Get the background id. | |
| void | SetProperties (int x, int y, int width, int height) |
| Set the position and dimensions of a TextBox. | |
| void | text (const std::string &str, bool convert_to_romaji=false) |
| Set the text. | |
| void | floats (bool f) |
| Set whether the text box floats or not. | |
| void | independent (bool i) |
| Set whether the text box is independent or not. | |
| void | visible (bool v) |
| Set whether the text will be visible or not. | |
| void | Move (int x, int y) |
| Moves the text box to another position. | |
| void | Adjust (int y) |
| Adjust the text box vertically if the upper box overlaps. | |
| void | Print () |
| Prints the text box in its position. | |
Private Member Functions | |
| std::string | ConvertToRomaji (std::string str) |
| Convert kana string to romaji. | |
Private Attributes | |
| FT_Face | face_ |
| Face of the font, not necesary to have the correct size. | |
| std::string | text_ |
| String of text to print. | |
| int | size_ |
| Font size. | |
| int | x_ |
| X position of the left side. | |
| int | y_ |
| Y position of the bottom side. | |
| int | width_ |
| Width of the box in pixels. | |
| int | height_ |
| Height of the box in pixels. | |
| bool | mutable_height_ |
| Whether the height is mutable or not. | |
| bool | floats_ |
| bool | independent_ |
| bool | visible_ |
| Types::Screen::selector | screen_ |
| Screen where the text box is. | |
| int | bgid_ |
Definition at line 30 of file textbox.h.
| void TextBox::floats | ( | bool | f | ) |
Set whether the text box floats or not.
Definition at line 104 of file textbox.cpp.
| bool TextBox::floats | ( | ) | const |
Get whether the text box floats or not.
Definition at line 84 of file textbox.cpp.
Referenced by SubScreenHandler::SetMode(), and MainScreenHandler::SetMode().
| void TextBox::independent | ( | bool | i | ) |
Set whether the text box is independent or not.
Definition at line 109 of file textbox.cpp.
| bool TextBox::independent | ( | ) | const |
Get whether the text box is independent or not.
Definition at line 89 of file textbox.cpp.
| void TextBox::Init | ( | Types::Screen::selector | screen, | |
| int | bgid, | |||
| FT_Face | face, | |||
| int | size, | |||
| int | x, | |||
| int | y, | |||
| int | width = 0, |
|||
| int | height = 0 | |||
| ) |
Initializer
| screen | Screen where the text box is | |
| bgid | background id | |
| face | FT_Face object from the TextHandler class | |
| size | Font size | |
| x | X position of the left side | |
| y | Y position of the bottom side | |
| width | Width of the box in pixels | |
| height | Maximum height of the box. By default is 0 which means infinite |
Definition at line 32 of file textbox.cpp.
Referenced by TextBoxHandler::NewTextBox().
| void TextBox::visible | ( | bool | v | ) |
Set whether the text will be visible or not.
Definition at line 114 of file textbox.cpp.
| bool TextBox::visible | ( | ) | const |
Get whether the text will be visible or not.
Definition at line 94 of file textbox.cpp.
Referenced by MainScreenHandler::PrintCard(), MainScreenHandler::SetMode(), and MainScreenHandler::ViewNext().
int TextBox::bgid_ [private] |
bool TextBox::floats_ [private] |
bool TextBox::independent_ [private] |
An independent text box won't be printed by the text boxes handler needs to be manually printed. By default: false
Definition at line 100 of file textbox.h.
Referenced by independent(), and Init().
bool TextBox::visible_ [private] |
1.5.8