1 #ifndef INC_OVERLAY_H
2 #define INC_OVERLAY_H
3 
4 #include <string>
5 #include <vector>
6 #include <SDL/SDL.h>
7 using namespace std;
8 
9 class Overlay : public vector<string>
10 {
11     private:
12 	bool drawWithFont(SDL_Surface* surface, const void* fontdata, int cw,
13 		int ch, Uint8 alpha=0, bool force=false);
14     public:
15 	float offy; // y offset from centre, in screen radii
16 	Uint32 colour;
17 
18 	// drawstr: convenience function - make 'str' the only entry, then
19 	// draw, then clear again
20 	void drawstr(SDL_Surface* surface, string str, Uint8 alpha=0);
21 
22 	void draw(SDL_Surface* surface, Uint8 alpha=0);
offy(offy)23 	Overlay(float offy=0, Uint32 colour=0xffffffff) : offy(offy),
24 	    colour(colour) {}
25 };
26 
27 #endif /* INC_OVERLAY_H */
28