doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DialogParticleEditor.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __DIALOGPARTICLEEDITOR_H__
30 #define __DIALOGPARTICLEEDITOR_H__
31 
32 #pragma once
33 
34 class CRangeSlider : public CSliderCtrl {
35 public:
36  void SetValueRange(float _low, float _high) {
37  low = _low;
38  high = _high;
39  }
40 
41  void SetValuePos( float val ) {
42  SetPos( GetRangeMin() + ( GetRangeMax() - GetRangeMin() ) * ( val - low ) / ( high - low ) );
43  }
44 
45  float GetValue() {
46  return low + ( high - low ) * ( float )( GetPos() - GetRangeMin() ) / ( GetRangeMax() - GetRangeMin() );
47  }
48 private:
49  float low, high;
50 };
51 
52 // CDialogParticleEditor dialog
53 
54 class CDialogParticleEditor : public CDialog {
55 
56  DECLARE_DYNAMIC(CDialogParticleEditor)
57 
58 public:
59  CDialogParticleEditor(CWnd* pParent = NULL); // standard constructor
60  virtual ~CDialogParticleEditor();
61 
62  void SelectParticle( const char *name );
63  void SetParticleVisualization( int i );
64  void SetVectorControlUpdate( idQuat rotation );
65 
67 
68  //{{AFX_VIRTUAL(CDialogParticleEditor)
69  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
70  virtual BOOL OnInitDialog();
71  //}}AFX_VIRTUAL
72 
73 protected:
74  //{{AFX_MSG(CDialogParticleEditor)
75  afx_msg void OnCbnSelchangeComboParticles();
76  afx_msg void OnCbnSelchangeComboPath();
77  afx_msg void OnLbnSelchangeListStages();
78  afx_msg void OnBnClickedButtonAddstage();
79  afx_msg void OnBnClickedButtonRemovestage();
80  afx_msg void OnBnClickedButtonBrowsematerial();
81  afx_msg void OnBnClickedButtonBrowsecolor();
82  afx_msg void OnBnClickedButtonBrowsefadecolor();
84  afx_msg void OnBnClickedRadioRect();
85  afx_msg void OnBnClickedRadioSphere();
86  afx_msg void OnBnClickedRadioCylinder();
87  afx_msg void OnBnClickedRadioCone();
88  afx_msg void OnBnClickedRadioOutward();
89  afx_msg void OnBnClickedRadioView();
90  afx_msg void OnBnClickedRadioAimed();
91  afx_msg void OnBnClickedRadioX();
92  afx_msg void OnBnClickedRadioY();
93  afx_msg void OnBnClickedRadioZ();
94  afx_msg void OnBnClickedButtonHidestage();
95  afx_msg void OnBnClickedButtonShowstage();
96  afx_msg void OnBnClickedCheckOneshot();
97  afx_msg void OnBnClickedButtonNew();
98  afx_msg void OnBnClickedButtonSave();
99  afx_msg void OnBnClickedButtonSaveAs();
100  afx_msg void OnBnClickedButtonSaveParticles();
101  afx_msg void OnBnClickedWorldGravity();
102  afx_msg void OnBnClickedEntityColor();
103  afx_msg void OnBnClickedTestModel();
104  afx_msg void OnBnClickedImpact();
105  afx_msg void OnBnClickedMuzzle();
106  afx_msg void OnBnClickedFlight();
107  afx_msg void OnBnClickedSelected();
108  afx_msg void OnBnClickedDoom();
109  afx_msg void OnBnClickedButtonUpdate();
110  afx_msg void OnBnClickedParticleMode();
111  afx_msg void OnBtnYup();
112  afx_msg void OnBtnYdn();
113  afx_msg void OnBtnXdn();
114  afx_msg void OnBtnXup();
115  afx_msg void OnBtnZup();
116  afx_msg void OnBtnZdn();
117  afx_msg void OnBtnDrop();
118  afx_msg void OnDestroy();
119  afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
120  //}}AFX_MSG
121 
122  DECLARE_MESSAGE_MAP()
123 
124 private:
125  //{{AFX_DATA(CDialogParticleEditor)
127  CComboBox comboParticle;
128  CListBox listStages;
145  CString depthHack;
146  CString matName;
147  CString animFrames;
148  CString animRate;
149  CString color;
150  CString fadeColor;
151  CString fadeIn;
152  CString fadeOut;
153  CString fadeFraction;
154  CString count;
155  CString time;
156  CString timeOffset;
157  CString deadTime;
158  CString gravity;
159  CString bunching;
160  CString offset;
161  CString xSize;
162  CString ySize;
163  CString zSize;
164  CString ringOffset;
166  CString directionParm;
170  CString viewOrigin;
171  CString speedFrom;
172  CString speedTo;
173  CString rotationFrom;
174  CString rotationTo;
175  CString sizeFrom;
176  CString sizeTo;
177  CString aspectFrom;
178  CString aspectTo;
179  CString customPath;
180  CString customParms;
181  CString trails;
182  CString trailTime;
183  CString cycles;
188  CString initialAngle;
190  CString customDesc;
191 
193  //}}AFX_DATA
194 
196 
197 private:
198  void EnumParticles();
199  void AddStage();
200  void RemoveStage();
201  void ShowStage();
202  void HideStage();
205  void ClearDlgVars();
206  void CurStageToDlgVars();
207  void DlgVarsToCurStage();
208  void ShowCurrentStage();
209  void UpdateControlInfo();
210  void SetParticleView();
211  void UpdateParticleData();
212  CToolTipCtrl toolTipCtrl;
213  BOOL PreTranslateMessage(MSG *pMsg);
214  void SetSelectedModel( const char *val );
215  void EnableStageControls();
216  void EnableEditControls();
217  void UpdateSelectedOrigin( float x, float y, float z );
219 protected:
220  virtual void OnOK();
221 };
222 
223 #endif /* !__DIALOGPARTICLEEDITOR_H__ */
afx_msg void OnBnClickedCheckOneshot()
afx_msg void OnBnClickedRadioAimed()
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
CDialogParticleEditor(CWnd *pParent=NULL)
#define private
Definition: TypeInfo.cpp:30
void UpdateSelectedOrigin(float x, float y, float z)
idDeclParticle * GetCurParticle()
GLenum GLint GLint y
Definition: glext.h:2849
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnBnClickedButtonSaveAs()
void SetVectorControlUpdate(idQuat rotation)
afx_msg void OnCbnSelchangeComboPath()
GLenum GLint x
Definition: glext.h:2849
int i
Definition: process.py:33
#define BOOL
Definition: mprintf.c:71
afx_msg void OnCbnSelchangeComboParticles()
afx_msg void OnBnClickedButtonAddstage()
afx_msg void OnBnClickedRadioOutward()
afx_msg void OnBnClickedWorldGravity()
afx_msg void OnLbnSelchangeListStages()
#define IDD_DIALOG_PARTICLE_EDITOR
afx_msg void OnBnClickedButtonSaveParticles()
afx_msg void OnBnClickedButtonBrowseEntitycolor()
void SelectParticle(const char *name)
afx_msg void OnBnClickedButtonBrowsefadecolor()
void SetValueRange(float _low, float _high)
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void OnBnClickedButtonUpdate()
afx_msg void OnBnClickedRadioSphere()
#define NULL
Definition: Lib.h:88
afx_msg void OnBnClickedButtonShowstage()
afx_msg void OnBnClickedButtonBrowsematerial()
afx_msg void OnBnClickedButtonHidestage()
afx_msg void OnBnClickedButtonBrowsecolor()
afx_msg void OnBnClickedEntityColor()
Definition: Quat.h:48
const GLcharARB * name
Definition: glext.h:3629
void SetValuePos(float val)
afx_msg void OnBnClickedButtonRemovestage()
GLdouble GLdouble z
Definition: glext.h:3067
afx_msg void OnBnClickedParticleMode()
afx_msg void OnBnClickedRadioCylinder()
idParticleStage * GetCurStage()
void SetSelectedModel(const char *val)