blob: a4fc55544dd4fe5c6c610b27ec07ec3f975b6c2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#pragma once
#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(float dt) 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;
};
}
|