| 1 |
#ifndef HEADER_WISTATUSBAR_H |
| 2 |
#define HEADER_WISTATUSBAR_H |
| 3 |
|
| 4 |
class Font; |
| 5 |
|
| 6 |
#include "IWidget.h" |
| 7 |
|
| 8 |
#include "SDL.h" |
| 9 |
#include <string> |
| 10 |
|
| 11 |
/** |
| 12 |
* Statusbar with fixed width. |
| 13 |
*/ |
| 14 |
class WiStatusBar : public IWidget { |
| 15 |
private: |
| 16 |
Font *m_font; |
| 17 |
SDL_Color m_color; |
| 18 |
int m_w; |
| 19 |
std::string m_label; |
| 20 |
public: |
| 21 |
WiStatusBar(Font *new_font, const SDL_Color &color, int width=0); |
| 22 |
virtual ~WiStatusBar(); |
| 23 |
virtual int getW() const { return m_w; } |
| 24 |
virtual int getH() const; |
| 25 |
void setLabel(const std::string &label) { m_label = label; } |
| 26 |
|
| 27 |
virtual void drawOn(SDL_Surface *screen); |
| 28 |
}; |
| 29 |
|
| 30 |
#endif |