1 /***************************************************************************
2                  partyeditor.h  -  The "create character" window
3                              -------------------
4     begin                : Tue Aug 12 2003
5     copyright            : (C) 2003 by Gabor Torok
6     email                : cctorok@yahoo.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #ifndef PARTY_EDITOR_H
19 #define PARTY_EDITOR_H
20 #pragma once
21 
22 #include <string.h>
23 #include <map>
24 #include "gui/widgetview.h"
25 #include "party.h"
26 #include "rpg/rpg.h"
27 
28 /**
29   *@author Gabor Torok
30   */
31 
32 class RenderedCreature;
33 class Creature;
34 class Scourge;
35 class UserConfiguration;
36 class CharacterInfoUI;
37 class Window;
38 class Button;
39 class Canvas;
40 class ScrollingList;
41 class ScrollingLabel;
42 class CardContainer;
43 class TextField;
44 class Label;
45 class SkillsView;
46 
47 class PcEditor;
48 
49 /// GUI for creating a player character.
50 class PartyEditor : public CreatureGroupInfo {
51 private:
52 
53 	Scourge *scourge;
54 	// never filled: std::map<int, Creature*> maxSkills;
55 	PcEditor *pcEditor;
56 
57 public:
58 	PartyEditor( Scourge *scourge );
59 	~PartyEditor();
60 
61 	Creature *getHighestSkillPC( int skill );
62 	void recomputeMaxSkills();
63 
64 	bool isVisible();
65 	void setVisible( bool b );
66 	Button *getStartGameButton();
67 	Button *getCancelButton();
68 	void handleEvent( Widget *widget, SDL_Event *event );
69 	void createParty( Creature **pc, int *partySize = NULL, bool addRandomBackpack = true );
70 	RenderedCreature *createWanderingHero( int level );
71 
72 protected:
73 	void saveUI( Creature **pc );
74 	void addStartingBackpack( Creature **pc, int partySize );
75 	void addStartingBackpack( Creature *pc );
76 	//void setCharType( int pcIndex, int charIndex );
77 	//void setDeityType( int pcIndex, int deityIndex );
78 
79 };
80 
81 #endif
82