| 1 |
#ifndef HEADER_TITLE_H |
| 2 |
#define HEADER_TITLE_H |
| 3 |
|
| 4 |
class Font; |
| 5 |
class Color; |
| 6 |
|
| 7 |
#include "Drawable.h" |
| 8 |
|
| 9 |
#include <string> |
| 10 |
|
| 11 |
/** |
| 12 |
* Subtitle. |
| 13 |
*/ |
| 14 |
class Title : public Drawable { |
| 15 |
private: |
| 16 |
static const int TIME_PER_CHAR = 2; |
| 17 |
static const int TIME_MIN = 40; |
| 18 |
int m_screenW; |
| 19 |
int m_screenH; |
| 20 |
int m_x; |
| 21 |
int m_y; |
| 22 |
int m_mintime; |
| 23 |
int m_limitY; |
| 24 |
int m_finalY; |
| 25 |
const std::string m_content; |
| 26 |
Font *m_font; |
| 27 |
SDL_Surface *m_surface; |
| 28 |
public: |
| 29 |
Title(int baseY, int finalY, int bonusTime, int limitY, |
| 30 |
const std::string &content, |
| 31 |
Font *font, const Color *color); |
| 32 |
virtual ~Title(); |
| 33 |
|
| 34 |
void shiftUp(int rate); |
| 35 |
void shiftFinalUp(int rate); |
| 36 |
virtual void drawOn(SDL_Surface *screen); |
| 37 |
bool isGone(); |
| 38 |
|
| 39 |
int getY() const; |
| 40 |
std::string getContent() const { return m_content; } |
| 41 |
}; |
| 42 |
|
| 43 |
#endif |