Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarCharCreation.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
commit6352e8e3196f78388b6c771073f9e03eaa612673 (patch)
treee23772f79a7fbc41bc9108951e9e136857484bf4 /source/frontend/StarCharCreation.hpp
parent6741a057e5639280d85d0f88ba26f000baa58f61 (diff)
everything everywhere
all at once
Diffstat (limited to 'source/frontend/StarCharCreation.hpp')
-rw-r--r--source/frontend/StarCharCreation.hpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/source/frontend/StarCharCreation.hpp b/source/frontend/StarCharCreation.hpp
new file mode 100644
index 0000000..272ea71
--- /dev/null
+++ b/source/frontend/StarCharCreation.hpp
@@ -0,0 +1,61 @@
+#ifndef _STAR_CHAR_CREATION_H_
+#define _STAR_CHAR_CREATION_H_
+
+#include "StarPane.hpp"
+#include "StarImageProcessing.hpp"
+#include "StarHumanoid.hpp"
+
+namespace Star {
+
+class Player;
+typedef shared_ptr<Player> PlayerPtr;
+
+STAR_EXCEPTION(CharCreationException, StarException);
+
+STAR_CLASS(CharCreationPane);
+class CharCreationPane : public Pane {
+public:
+ // The callback here is either called with null (when the user hits the
+ // cancel button) or the newly created player (when the user hits the save
+ // button).
+ CharCreationPane(function<void(PlayerPtr)> requestCloseFunc);
+
+ void randomize();
+ void randomizeName();
+
+ virtual void tick() override;
+ virtual bool sendEvent(InputEvent const& event) override;
+
+ virtual PanePtr createTooltip(Vec2I const&) override;
+
+private:
+ void nameBoxCallback(Widget* object);
+
+ void changed();
+
+ void createPlayer();
+
+ void setShirt(String const& shirt, size_t colorIndex);
+ void setPants(String const& pants, size_t colorIndex);
+
+ PlayerPtr m_previewPlayer;
+
+ StringList m_speciesList;
+
+ size_t m_speciesChoice;
+ size_t m_genderChoice;
+ size_t m_modeChoice;
+ size_t m_bodyColor;
+ size_t m_alty;
+ size_t m_hairChoice;
+ size_t m_heady;
+ size_t m_shirtChoice;
+ size_t m_shirtColor;
+ size_t m_pantsChoice;
+ size_t m_pantsColor;
+ size_t m_personality;
+};
+
+}
+
+#endif