Dragonfly 4.20
A text-based game engine
|
Public Member Functions | |
Frame () | |
Frame (int new_width, int new_height, std::string frame_str) | |
void | setWidth (int new_width) |
int | getWidth () const |
void | setHeight (int new_height) |
int | getHeight () const |
void | setString (std::string new_frame_str) |
std::string | getString () const |
int | draw (Vector position, Color color, char transparency) const |
Private Attributes | |
int | m_width |
int | m_height |
std::string | m_frame_str |
df::Frame::Frame | ( | ) |
Create empty frame.
df::Frame::Frame | ( | int | new_width, |
int | new_height, | ||
std::string | frame_str | ||
) |
Create frame of indicated width and height with string.
Draw self, centered at position (x,y) with color.
Don't draw transparent characters (0 means none). Return 0 if ok, else -1. Note: top-left coordinate is (0,0).
int df::Frame::getHeight | ( | ) | const |
Get height of frame.
std::string df::Frame::getString | ( | ) | const |
Get frame characters (stored as string).
int df::Frame::getWidth | ( | ) | const |
Get width of frame.
void df::Frame::setHeight | ( | int | new_height | ) |
Set height of frame.
void df::Frame::setString | ( | std::string | new_frame_str | ) |
Set frame characters (stored as string).
void df::Frame::setWidth | ( | int | new_width | ) |
Set width of frame.
|
private |
All frame characters stored as string.
|
private |
Height of frame.
|
private |
Width of frame.