Planeshift
pawscharbirth.h
Go to the documentation of this file.
1 /*
2  * pawscharbirth.h - Author: Andrew Dai
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef PAWS_CHAR_BIRTH_HEADER
20 #define PAWS_CHAR_BIRTH_HEADER
21 
22 #include "paws/pawswidget.h"
23 #include "psclientchar.h"
24 
25 class pawsTextBox;
26 
28 struct Zodiac
29 {
30  csString name;
31  csString img;
32  csString desc;
33  unsigned int month;
34 };
35 
39 class pawsCharBirth : public pawsWidget
40 {
41 public:
42  pawsCharBirth();
43  ~pawsCharBirth();
44  pawsCharBirth(const pawsCharBirth& origin){}
45  void OnListAction( pawsListBox* widget, int status );
46  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
47  bool PostSetup();
48  void Show();
49  void Draw();
50  void Randomize();
51 
52  Zodiac* GetZodiac(const char* name);
53  Zodiac* GetZodiac(unsigned int month);
54 
55 private:
56  void PopulateFields();
57 
58  int lastSiblingsChoice;
59  int lastZodiacChoice;
60  int sibCount;
61  bool dataLoaded;
62 
63  // Contains the zodiacs
64  csPDelArray<Zodiac> zodiacs;
65 
66  psCreationManager* createManager;
67  pawsTextBox* cpBox;
68  void UpdateCP();
69 
70  pawsComboBox* months;
71  pawsComboBox* days;
72 };
73 
75 
76 #endif
77 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
unsigned int month
Definition: pawscharbirth.h:33
Char creation screen with birth, zodiac, siblings, parents, ....
Definition: pawscharbirth.h:39
CREATE_PAWS_FACTORY(pawsCharBirth)
A simple list box widget.
Definition: pawslistbox.h:202
pawsCharBirth(const pawsCharBirth &origin)
Definition: pawscharbirth.h:44
A basic combo box widget.
Definition: pawscombo.h:53
csString name
Definition: pawscharbirth.h:30
Struct for the zodiacs.
Definition: pawscharbirth.h:28
csString desc
Definition: pawscharbirth.h:32
csString img
Definition: pawscharbirth.h:31
A basic text box widget.
Definition: pawstextbox.h:42
Handles all the details of the character creation on the client side.
Definition: psclientchar.h:261