X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgraphics%2FCharSelect.h;fp=src%2Fgraphics%2FCharSelect.h;h=c5d4cd8e844636aec27403d840a350ad835282b1;hb=9666839d0ca6c794d28226a007870c82ef4ddb20;hp=0000000000000000000000000000000000000000;hpb=60e0fe29ce6cd033edc78b181d9d07fa72c11172;p=l2e.git diff --git a/src/graphics/CharSelect.h b/src/graphics/CharSelect.h new file mode 100644 index 0000000..c5d4cd8 --- /dev/null +++ b/src/graphics/CharSelect.h @@ -0,0 +1,51 @@ +#ifndef GRAPHICS_CHARSELECT_H_ +#define GRAPHICS_CHARSELECT_H_ + +#include "../geometry/Vector.h" + +#include + +namespace graphics { + +class Font; +class Sprite; + +class CharSelect { + +public: + CharSelect(); + + static const int TYPE_ID = 411; + +public: + void Draw(SDL_Surface *screen, const geometry::Vector &position) const; + + void NextCol(); + void PreviousCol(); + void NextRow(); + void PreviousRow(); + + char Selected() const; + +public: + static void CreateTypeDescription(); + static void Construct(void *); + static void Load(void *); + +private: + const Font *font; + const Sprite *cursor; + const char *chars; + int numChars; + + int width; + int groupX; + int groupY; + + int selected; + +}; + +} + +#endif /* GRAPHICS_CHARSELECT_H_ */