| 1 |
#ifndef HEADER_NODEDRAWER_H |
| 2 |
#define HEADER_NODEDRAWER_H |
| 3 |
|
| 4 |
class V2; |
| 5 |
class LevelNode; |
| 6 |
class ResImagePack; |
| 7 |
class Font; |
| 8 |
|
| 9 |
#include "NoCopy.h" |
| 10 |
|
| 11 |
#include "SDL.h" |
| 12 |
#include <string> |
| 13 |
|
| 14 |
/** |
| 15 |
* Drawer which know how to draw nodes on path. |
| 16 |
*/ |
| 17 |
class NodeDrawer : public NoCopy { |
| 18 |
private: |
| 19 |
ResImagePack *m_imagePack; |
| 20 |
SDL_Surface *m_screen; |
| 21 |
Font *m_font; |
| 22 |
private: |
| 23 |
void drawDot(SDL_Surface *dot, const V2 &loc) const; |
| 24 |
public: |
| 25 |
NodeDrawer(); |
| 26 |
virtual ~NodeDrawer(); |
| 27 |
void setScreen(SDL_Surface *screen) { m_screen = screen; } |
| 28 |
|
| 29 |
void drawNode(const LevelNode *node) const; |
| 30 |
void drawEdge(const LevelNode *start, const LevelNode *end) const; |
| 31 |
void drawSelect(const V2 &loc) const; |
| 32 |
void drawSelected(const std::string &levelname) const; |
| 33 |
}; |
| 34 |
|
| 35 |
#endif |