Definition at line 14 of file WiStatusBar.h.
Public Member Functions | |
WiStatusBar (Font *new_font, const SDL_Color &color, int width=0) | |
virtual | ~WiStatusBar () |
virtual int | getW () const |
virtual int | getH () const |
void | setLabel (const std::string &label) |
virtual void | drawOn (SDL_Surface *screen) |
|
Definition at line 14 of file WiStatusBar.cpp. 00015 : m_color(color) 00016 { 00017 m_font = new_font; 00018 m_w = width; 00019 }
|
|
Definition at line 21 of file WiStatusBar.cpp. 00022 {
00023 delete m_font;
00024 }
|
|
Implements Drawable. Definition at line 33 of file WiStatusBar.cpp. 00034 { 00035 if (!m_label.empty()) { 00036 SDL_Rect rect; 00037 rect.x = m_shift.getX(); 00038 rect.y = m_shift.getY(); 00039 00040 SDL_Surface *rendered = m_font->renderTextOutlined(m_label, m_color); 00041 SDL_BlitSurface(rendered, NULL, screen, &rect); 00042 SDL_FreeSurface(rendered); 00043 } 00044 }
|
|
Implements IWidget. Definition at line 27 of file WiStatusBar.cpp. 00028 { 00029 return m_font->getHeight(); 00030 }
|
|
Implements IWidget. Definition at line 23 of file WiStatusBar.h. 00023 { return m_w; }
|
|
Definition at line 25 of file WiStatusBar.h. 00025 { m_label = label; }
|