Planeshift
pawscharparents.h
Go to the documentation of this file.
1 /*
2  * pawscharparents.h - Author: Andrew Craig
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_CHARACTER_CREATION_PARENTS
20 #define PAWS_CHARACTER_CREATION_PARENTS
21 
22 #include "paws/pawswidget.h"
23 #include "paws/pawsradio.h"
24 #include "paws/pawstextbox.h"
25 
27 // FORWARD DECLARATIONS
29 class psCreationManager;
31 class pawsComboBox;
32 class pawsTextBox;
34 
38 {
39 public:
42 
43  void Draw();
44 
45  bool PostSetup();
46  void OnListAction( pawsListBox* widget, int status );
47  void Show();
48 
49  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
50 private:
51  void Randomize();
52 
54  psCreationManager* createManager;
55 
57  bool dataLoaded;
58 
59  /*/// parents' names widgets
60  pawsEditTextBox* fatherNameTextBox;
61  pawsEditTextBox* motherNameTextBox;*/
62 
64  pawsMultiLineTextBox* fatherJobDesc;
65  pawsMultiLineTextBox* motherJobDesc;
66 
68  pawsRadioButtonGroup* fatherStatus;
69  pawsRadioButtonGroup* motherStatus;
70 
71  pawsComboBox* religionBox;
72  pawsMultiLineTextBox* religionDesc;
73 
74  pawsTextBox* cpBox;
75 
80  void PopulateFields();
81 
83  void HandleMotherStatus( int newMod );
84  void HandleFatherStatus( int newMod );
85 
86  void UpdateCP();
87 
88  int lastFatherChoice;
89  int lastMotherChoice;
90  int lastReligionChoice;
91  int religionCount;
92 
93  int fMod;
94  int fLastMod;
95 
96  int mMod;
97  int mLastMod;
98 
99 
100 };
101 
103 
104 #endif
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
bool PostSetup()
This is called after the widget and all of it's children have been created.
A simple list box widget.
Definition: pawslistbox.h:202
Handles the Parent screen in character creation.
A basic combo box widget.
Definition: pawscombo.h:53
void Draw()
Draws the widget and all of it's children.
CREATE_PAWS_FACTORY(pawsCharParents)
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
void Show()
Makes widget visible and brings it to the front.
A basic text box widget.
Definition: pawstextbox.h:42
void OnListAction(pawsListBox *widget, int status)
Called whenever an item in a child list box is selected.
Handles all the details of the character creation on the client side.
Definition: psclientchar.h:261
This is a set of radio buttons and is used to control them.
Definition: pawsradio.h:131