]> icculus.org git repositories - taylor/freespace2.git/blob - include/playerstarteditor.h
Initial revision
[taylor/freespace2.git] / include / playerstarteditor.h
1 /*
2  * $Logfile: /Freespace2/code/fred2/PlayerStartEditor.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Player starting point editor dialog box handling code
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
14  * 3     2/23/99 7:03p Dave
15  * Rewrote a horribly mangled and evil team loadout dialog. Bugs gone.
16  * 
17  * 2     10/07/98 6:28p Dave
18  * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
19  * Fred. Globalized mission and campaign file extensions. Removed Silent
20  * Threat specific code.
21  * 
22  * 1     10/07/98 3:01p Dave
23  * 
24  * 1     10/07/98 3:00p Dave
25  * 
26  * 17    1/15/98 5:04p Hoffoss
27  * Fixed functionality of team loadout editor.
28  * 
29  * 16    10/03/97 6:16p Hoffoss
30  * Added weapon loadout editing to player editor (now called team loadout
31  * editor)
32  * 
33  * 15    9/16/97 9:41p Hoffoss
34  * Changed Fred code around to stop using Parse_player structure for
35  * player information, and use actual ships instead.
36  * 
37  * 14    8/16/97 2:16p Hoffoss
38  * Made changed to how checkboxes work.
39  * 
40  * 13    8/13/97 10:17p Hoffoss
41  * Added player entry delay support to Fred, and moved the
42  * Player_entry_delay variable to a common library instead of FreeSpace.
43  * 
44  * 12    5/20/97 2:28p Hoffoss
45  * Added message box queries for close window operation on all modal
46  * dialog boxes.
47  * 
48  * 11    4/17/97 2:01p Hoffoss
49  * All dialog box window states are saved between sessions now.
50  * 
51  * 10    3/11/97 5:41p Hoffoss
52  * Player start editor now displays wing ship counts.  Removed default
53  * player ship selection box.
54  * 
55  * 9     3/11/97 4:52p Hoffoss
56  * changed player start editor dialog functioning.
57  * 
58  * 8     2/26/97 5:31p Hoffoss
59  * Added support for default player ship in player editor dialog box.
60  * 
61  * 7     2/21/97 5:34p Hoffoss
62  * Added extensive modification detection and fixed a bug in initial
63  * orders editor.
64  * 
65  * 6     2/17/97 5:28p Hoffoss
66  * Checked RCS headers, added them were missing, changing description to
67  * something better, etc where needed.
68  * 
69  * 5     1/30/97 2:24p Hoffoss
70  * Added remaining mission file structures and implemented load/save of
71  * them.
72  *
73  * $NoKeywords: $
74  */
75
76 #include "shipchecklistbox.h"
77
78 /////////////////////////////////////////////////////////////////////////////
79 // player_start_editor dialog
80
81 class player_start_editor : public CDialog
82 {
83 // Construction
84 public: 
85         player_start_editor(CWnd* pParent = NULL);   // standard constructor
86
87 // Dialog Data
88         //{{AFX_DATA(player_start_editor)
89         enum { IDD = IDD_LOADOUT_EDITOR };
90         CSpinButtonCtrl m_pool_spin;
91         CSpinButtonCtrl m_delay_spin;
92         CSpinButtonCtrl m_spin1;
93         CCheckListBox           m_ship_list;
94         CCheckListBox           m_weapon_list;  
95         int                                     m_delay;        
96         int                                     m_weapon_pool;
97         int                                     m_ship_pool;
98         //}}AFX_DATA
99
100
101 // Overrides
102         // ClassWizard generated virtual function overrides
103         //{{AFX_VIRTUAL(player_start_editor)
104         protected:
105         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
106         virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
107         //}}AFX_VIRTUAL
108
109 // Implementation
110 protected:
111
112         // Generated message map functions
113         //{{AFX_MSG(player_start_editor)
114         virtual BOOL OnInitDialog();
115         afx_msg void OnInitMenu(CMenu* pMenu);
116         afx_msg void OnSelchangeShipList();             
117         afx_msg void OnSelchangeWeaponList();   
118         afx_msg void OnUpdateShipPool();
119         afx_msg void OnUpdateWeaponPool();
120         void OnCancel();        
121         void OnOK();
122         //}}AFX_MSG
123         DECLARE_MESSAGE_MAP()
124
125 private:
126         // if we've finished initializing the dialog
127         int dlg_inited;
128
129         // team we're currently working with
130         int selected_team;
131
132         // ship pool info
133         int ship_pool[MAX_TEAMS][MAX_SHIP_TYPES];
134
135         // weapon pool info
136         int weapon_pool[MAX_TEAMS][MAX_WEAPON_TYPES];
137
138         // regenerate all controls
139         void reset_controls();
140 };
141