2 ===========================================================================
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
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.
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.
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/>.
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.
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.
26 ===========================================================================
31 #include "PropertyList.h"
32 #include "PreviewDlg.h"
38 class CEntityDlg : public CDialog
40 DECLARE_DYNAMIC(CEntityDlg)
42 CEntityDlg(CWnd* pParent = NULL); // standard constructor
43 virtual ~CEntityDlg();
44 void SetDict(idDict *_dict) {
47 void SetEditEntity(entity_t *ent) {
52 static CPreviewDlg *ShowModelChooser();
53 static CPreviewDlg *ShowGuiChooser();
54 static CPreviewDlg *ShowSoundChooser();
55 static CPreviewDlg *ShowMaterialChooser();
56 static CPreviewDlg *ShowParticleChooser();
57 static CPreviewDlg *ShowSkinChooser( entity_t *ent );
59 void SetKeyVal(const char *key, const char *val) {
60 editKey.SetWindowText(key);
61 editVal.SetWindowText(val);
64 void EditCurvePoints();
65 void AddCurvePoints();
66 void InsertCurvePoint();
67 void DeleteCurvePoint();
70 enum { IDD = IDD_DIALOG_ENTITY };
73 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
75 //DECLARE_MESSAGE_MAP()
78 virtual BOOL OnInitDialog();
79 virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
81 void UpdateEntitySel(eclass_t *ent);
82 void SetKeyValPairs( bool updateAnims = true );
83 static const char *TranslateString(const char *p);
86 void UpdateFromListBox();
89 void UpdateKeyVal(const char *key, const char *val);
90 void SelectCurvePointByRay(const idVec3 &org, const idVec3 &dir, int buttons);
91 void UpdateEntityCurve();
96 bool multipleEntities;
97 CPropertyList listKeyVal;
98 CPropertyList listVars;
101 const idMD5Anim* currentAnimation;
102 int currentAnimationFrame;
104 const char *AngleKey();
106 idPointListInterface curvePoints;
108 void UpdateFromAnimationFrame ( bool updateKeyValueDisplay = true);
109 DECLARE_MESSAGE_MAP()
110 afx_msg void OnSize(UINT nType, int cx, int cy);
134 CComboBox cbAnimations;
135 CSliderCtrl slFrameSlider;
136 afx_msg void OnCbnSelchangeComboClass();
137 afx_msg void OnLbnSelchangeListkeyval();
138 virtual BOOL PreTranslateMessage(MSG* pMsg);
139 afx_msg void OnBnClickedE135();
140 afx_msg void OnBnClickedE90();
141 afx_msg void OnBnClickedE45();
142 afx_msg void OnBnClickedE180();
143 afx_msg void OnBnClickedE0();
144 afx_msg void OnBnClickedE225();
145 afx_msg void OnBnClickedE270();
146 afx_msg void OnBnClickedE315();
147 afx_msg void OnBnClickedEUp();
148 afx_msg void OnBnClickedEDown();
149 afx_msg void OnBnClickedButtonModel();
150 afx_msg void OnBnClickedButtonSound();
151 afx_msg void OnBnClickedButtonGui();
152 afx_msg void OnBnClickedButtonBrowse();
153 afx_msg void OnCbnDblclkComboClass();
154 afx_msg void OnBnClickedButtonCreate();
155 afx_msg void OnBnClickedStartAnimation();
156 afx_msg void OnBnClickedStopAnimation();
158 afx_msg void OnLbnDblclkListkeyval();
159 afx_msg void OnLbnSelchangeListVars();
160 afx_msg void OnLbnDblclkListVars();
161 void OnNMReleasedcaptureSlider1(NMHDR *pNMHDR, LRESULT *pResult);
162 afx_msg void OnCbnAnimationChange ();
163 void OnTimer(UINT nIDEvent);
164 afx_msg void OnBnClickedButtonParticle();
165 afx_msg void OnBnClickedButtonSkin();
166 afx_msg void OnBnClickedButtonCurve();