]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/CharSelect.h
implemented capsule renaming
[l2e.git] / src / graphics / CharSelect.h
diff --git a/src/graphics/CharSelect.h b/src/graphics/CharSelect.h
new file mode 100644 (file)
index 0000000..c5d4cd8
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef GRAPHICS_CHARSELECT_H_
+#define GRAPHICS_CHARSELECT_H_
+
+#include "../geometry/Vector.h"
+
+#include <SDL.h>
+
+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<int> &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_ */