]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/af/DialogAFProperties.cpp
hello world
[icculus/iodoom3.git] / neo / tools / af / DialogAFProperties.cpp
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 #include "../../idlib/precompiled.h"
30 #pragma hdrstop
31
32 #include "../../sys/win32/rc/AFEditor_resource.h"
33
34 #include "DialogAF.h"
35 #include "DialogAFProperties.h"
36 #include "DialogAFBody.h"
37 #include "DialogAFConstraint.h"
38
39
40 // DialogAFProperties dialog
41
42 toolTip_t DialogAFProperties::toolTips[] = {
43         { IDC_EDIT_MODEL, "model def" },
44         { IDC_BUTTON_BROWSE_MODEL, "browse model def" },
45         { IDC_EDIT_SKIN, "skin" },
46         { IDC_BUTTON_BROWSE_SKIN, "browse skin" },
47         { IDC_EDIT_LINEARFRICTION, "translational friction" },
48         { IDC_EDIT_ANGULARFRICTION, "rotational friction" },
49         { IDC_EDIT_CONTACTFRICTION, "friction with contact surfaces" },
50         { IDC_EDIT_CONSTRAINTFRICTION, "constraint friction" },
51         { IDC_CHECK_SELFCOLLISION, "allow bodies to collide with other bodies of this articulated figure" },
52         { IDC_EDIT_CONTENTS, "content of bodies" },
53         { IDC_EDIT_CLIPMASK, "collide with these content types" },
54         { IDC_EDIT_TOTALMASS, "scale the mass of each body to get this total mass" },
55         { IDC_EDIT_LINEARVELOCITY, "do not suspend simulation if the linear velocity is higher than this value" },
56         { IDC_EDIT_ANGULARVELOCITY, "do not suspend simulation if the angular velocity is higher than this value" },
57         { IDC_EDIT_LINEARACCELERATION, "do not suspend simulation if the linear acceleration is higher than this value" },
58         { IDC_EDIT_ANGULARACCELERATION, "do not suspend simulation if the angular acceleration is higher than this value" },
59         { IDC_EDIT_NO_MOVE_TIME, "suspend simulation if hardly any movement for this many seconds" },
60         { IDC_EDIT_MAXIMUM_MOVE_TIME, "always suspend simulation after running for this many seconds" },
61         { IDC_EDIT_LINEAR_TOLERANCE, "maximum translation considered no movement" },
62         { IDC_EDIT_ANGULAR_TOLERANCE, "maximum rotation considered no movement" },
63         { 0, NULL }
64 };
65
66 IMPLEMENT_DYNAMIC(DialogAFProperties, CDialog)
67
68 /*
69 ================
70 DialogAFProperties::DialogAFProperties
71 ================
72 */
73 DialogAFProperties::DialogAFProperties(CWnd* pParent /*=NULL*/)
74         : CDialog(DialogAFProperties::IDD, pParent)
75         , m_selfCollision(false)
76         , m_linearFriction(0)
77         , m_angularFriction(0)
78         , m_contactFriction(0)
79         , m_constraintFriction(0)
80         , m_totalMass(0)
81         , m_suspendLinearVelocity(0)
82         , m_suspendAngularVelocity(0)
83         , m_suspendLinearAcceleration(0)
84         , m_suspendAngularAcceleration(0)
85         , m_noMoveTime(0)
86         , m_minMoveTime(0)
87         , m_maxMoveTime(0)
88         , m_linearTolerance(0)
89         , m_angularTolerance(0)
90         , file(NULL)
91 {
92         Create( IDD_DIALOG_AF_PROPERTIES, pParent );
93         EnableToolTips( TRUE );
94 }
95
96 /*
97 ================
98 DialogAFProperties::~DialogAFProperties
99 ================
100 */
101 DialogAFProperties::~DialogAFProperties() {
102 }
103
104 /*
105 ================
106 DialogAFProperties::DoDataExchange
107 ================
108 */
109 void DialogAFProperties::DoDataExchange(CDataExchange* pDX) {
110         CDialog::DoDataExchange(pDX);
111         //{{AFX_DATA_MAP(DialogAFProperties)
112         DDX_Control(pDX, IDC_EDIT_MODEL, m_editModel);
113         DDX_Control(pDX, IDC_EDIT_SKIN, m_editSkin);
114         DDX_Check(pDX, IDC_CHECK_SELFCOLLISION, m_selfCollision);
115         DDX_Control(pDX, IDC_EDIT_CONTENTS, m_editContents);
116         DDX_Control(pDX, IDC_EDIT_CLIPMASK, m_editClipMask);
117         DDX_Text(pDX, IDC_EDIT_LINEARFRICTION, m_linearFriction);
118         DDX_Text(pDX, IDC_EDIT_ANGULARFRICTION, m_angularFriction);
119         DDX_Text(pDX, IDC_EDIT_CONTACTFRICTION, m_contactFriction);
120         DDX_Text(pDX, IDC_EDIT_CONSTRAINTFRICTION, m_constraintFriction);
121         DDX_Text(pDX, IDC_EDIT_TOTALMASS, m_totalMass);
122         DDX_Text(pDX, IDC_EDIT_LINEARVELOCITY, m_suspendLinearVelocity);
123         DDX_Text(pDX, IDC_EDIT_ANGULARVELOCITY, m_suspendAngularVelocity);
124         DDX_Text(pDX, IDC_EDIT_LINEARACCELERATION, m_suspendLinearAcceleration);
125         DDX_Text(pDX, IDC_EDIT_ANGULARACCELERATION, m_suspendAngularAcceleration);
126         DDX_Text(pDX, IDC_EDIT_NO_MOVE_TIME, m_noMoveTime);
127         DDX_Text(pDX, IDC_EDIT_MINIMUM_MOVE_TIME, m_minMoveTime);
128         DDX_Text(pDX, IDC_EDIT_MAXIMUM_MOVE_TIME, m_maxMoveTime);
129         DDX_Text(pDX, IDC_EDIT_LINEAR_TOLERANCE, m_linearTolerance);
130         DDX_Text(pDX, IDC_EDIT_ANGULAR_TOLERANCE, m_angularTolerance);
131         //}}AFX_DATA_MAP
132 }
133
134 /*
135 ================
136 DialogAFProperties::LoadFile
137 ================
138 */
139 void DialogAFProperties::LoadFile( idDeclAF *af ) {
140         idStr str;
141
142         file = af;
143
144         if ( !file ) {
145                 ClearFile();
146                 return;
147         }
148         m_editModel.SetWindowText( file->model.c_str() );
149         m_editSkin.SetWindowText( file->skin.c_str() );
150         m_selfCollision = file->selfCollision;
151         idDeclAF::ContentsToString( file->contents, str );
152         m_editContents.SetWindowText( str );
153         idDeclAF::ContentsToString( file->clipMask, str );
154         m_editClipMask.SetWindowText( str );
155         m_linearFriction = file->defaultLinearFriction;
156         m_angularFriction = file->defaultAngularFriction;
157         m_contactFriction = file->defaultContactFriction;
158         m_constraintFriction = file->defaultConstraintFriction;
159         m_totalMass = file->totalMass;
160         m_suspendLinearVelocity = file->suspendVelocity[0];
161         m_suspendAngularVelocity = file->suspendVelocity[1];
162         m_suspendLinearAcceleration = file->suspendAcceleration[0];
163         m_suspendAngularAcceleration = file->suspendAcceleration[1];
164         m_noMoveTime = file->noMoveTime;
165         m_minMoveTime = file->minMoveTime;
166         m_maxMoveTime = file->maxMoveTime;
167         m_linearTolerance = file->noMoveTranslation;
168         m_angularTolerance = file->noMoveRotation;
169         UpdateData( FALSE );
170 }
171
172 /*
173 ================
174 DialogAFProperties::SetFile
175 ================
176 */
177 void DialogAFProperties::SaveFile( void ) {
178         CString str;
179
180         if ( !file ) {
181                 return;
182         }
183         UpdateData( TRUE );
184         m_editModel.GetWindowText( str );
185         file->model = str;
186         m_editSkin.GetWindowText( str );
187         file->skin = str;
188         file->selfCollision = ( m_selfCollision != FALSE );
189         m_editContents.GetWindowText( str );
190         file->contents = idDeclAF::ContentsFromString( str );
191         m_editClipMask.GetWindowText( str );
192         file->clipMask = idDeclAF::ContentsFromString( str );
193         file->defaultLinearFriction = m_linearFriction;
194         file->defaultAngularFriction = m_angularFriction;
195         file->defaultContactFriction = m_contactFriction;
196         file->defaultConstraintFriction = m_constraintFriction;
197         file->totalMass = m_totalMass;
198         file->suspendVelocity[0] = m_suspendLinearVelocity;
199         file->suspendVelocity[1] = m_suspendAngularVelocity;
200         file->suspendAcceleration[0] = m_suspendLinearAcceleration;
201         file->suspendAcceleration[1] = m_suspendAngularAcceleration;
202         file->noMoveTime = m_noMoveTime;
203         file->minMoveTime = m_minMoveTime;
204         file->maxMoveTime = m_maxMoveTime;
205         file->noMoveTranslation = m_linearTolerance;
206         file->noMoveRotation = m_angularTolerance;
207
208         AFDialogSetFileModified();
209 }
210
211 /*
212 ================
213 DialogAFProperties::UpdateFile
214 ================
215 */
216 void DialogAFProperties::UpdateFile( void ) {
217         SaveFile();
218         if ( file ) {
219                 gameEdit->AF_UpdateEntities( file->GetName() );
220         }
221 }
222
223 /*
224 ================
225 DialogAFProperties::ClearFile
226 ================
227 */
228 void DialogAFProperties::ClearFile( void ) {
229         m_editModel.SetWindowText( "" );
230         m_editSkin.SetWindowText( "" );
231         m_selfCollision = false;
232         m_editContents.SetWindowText( "" );
233         m_editClipMask.SetWindowText( "" );
234         m_linearFriction = 0.0f;
235         m_angularFriction = 0.0f;
236         m_contactFriction = 0.0f;
237         m_constraintFriction = 0.0f;
238         m_totalMass = -1.0f;
239         m_suspendLinearVelocity = 0.0f;
240         m_suspendAngularVelocity = 0.0f;
241         m_suspendLinearAcceleration = 0.0f;
242         m_suspendAngularAcceleration = 0.0f;
243         m_noMoveTime = 0.0f;
244         m_minMoveTime = 0.0f;
245         m_maxMoveTime = 0.0f;
246         m_linearTolerance = 0.0f;
247         m_angularTolerance = 0.0f;
248         UpdateData( FALSE );
249 }
250
251 /*
252 ================
253 DialogAFProperties::OnToolHitTest
254 ================
255 */
256 int DialogAFProperties::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const {
257         CDialog::OnToolHitTest( point, pTI );
258         return DefaultOnToolHitTest( toolTips, this, point, pTI );
259 }
260
261 BEGIN_MESSAGE_MAP(DialogAFProperties, CDialog)
262         ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
263         ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
264         ON_EN_CHANGE(IDC_EDIT_MODEL, OnEnChangeEditModel)
265         ON_BN_CLICKED(IDC_BUTTON_BROWSE_MODEL, OnBnClickedButtonBrowseModel)
266         ON_EN_CHANGE(IDC_EDIT_SKIN, OnEnChangeEditSkin)
267         ON_BN_CLICKED(IDC_BUTTON_BROWSE_SKIN, OnBnClickedButtonBrowseSkin)
268         ON_EN_CHANGE(IDC_EDIT_LINEARFRICTION, OnEnChangeEditLinearfriction)
269         ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_LINEARFRICTION, OnDeltaposSpinLinearfriction)
270         ON_EN_CHANGE(IDC_EDIT_ANGULARFRICTION, OnEnChangeEditAngularfriction)
271         ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_ANGULARFRICTION, OnDeltaposSpinAngularfriction)
272         ON_EN_CHANGE(IDC_EDIT_CONTACTFRICTION, OnEnChangeEditContactfriction)
273         ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_CONTACTFRICTION, OnDeltaposSpinContactfriction)
274         ON_EN_CHANGE(IDC_EDIT_CONSTRAINTFRICTION, OnEnChangeEditConstraintfriction)
275         ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_CONSTRAINTFRICTION, OnDeltaposSpinConstraintfriction)
276         ON_BN_CLICKED(IDC_CHECK_SELFCOLLISION, OnBnClickedCheckSelfcollision)
277         ON_EN_CHANGE(IDC_EDIT_CONTENTS, OnEnChangeEditContents)
278         ON_EN_CHANGE(IDC_EDIT_CLIPMASK, OnEnChangeEditClipmask)
279         ON_EN_CHANGE(IDC_EDIT_TOTALMASS, OnEnChangeEditTotalmass)
280         ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_TOTALMASS, OnDeltaposSpinTotalmass)
281         ON_EN_CHANGE(IDC_EDIT_LINEARVELOCITY, OnEnChangeEditLinearvelocity)
282         ON_EN_CHANGE(IDC_EDIT_ANGULARVELOCITY, OnEnChangeEditAngularvelocity)
283         ON_EN_CHANGE(IDC_EDIT_LINEARACCELERATION, OnEnChangeEditLinearacceleration)
284         ON_EN_CHANGE(IDC_EDIT_ANGULARACCELERATION, OnEnChangeEditAngularacceleration)
285         ON_EN_CHANGE(IDC_EDIT_NO_MOVE_TIME, OnEnChangeEditNomovetime)
286         ON_EN_CHANGE(IDC_EDIT_MINIMUM_MOVE_TIME, OnEnChangeEditMinimummovetime)
287         ON_EN_CHANGE(IDC_EDIT_MAXIMUM_MOVE_TIME, OnEnChangeEditMaximummovetime)
288         ON_EN_CHANGE(IDC_EDIT_LINEAR_TOLERANCE, OnEnChangeEditLineartolerance)
289         ON_EN_CHANGE(IDC_EDIT_ANGULAR_TOLERANCE, OnEnChangeEditAngulartolerance)
290 END_MESSAGE_MAP()
291
292
293 // DialogAFProperties message handlers
294
295 BOOL DialogAFProperties::OnToolTipNotify( UINT id, NMHDR *pNMHDR, LRESULT *pResult ) {
296         return DefaultOnToolTipNotify( toolTips, id, pNMHDR, pResult );
297 }
298
299 void DialogAFProperties::OnEnChangeEditModel() {
300         if ( EditControlEnterHit( &m_editModel ) ) {
301                 UpdateFile();
302         }
303 }
304
305 void DialogAFProperties::OnEnChangeEditSkin() {
306         if ( EditControlEnterHit( &m_editSkin ) ) {
307                 UpdateFile();
308                 // reload the .af file
309                 AFDialogReloadFile();
310         }
311 }
312
313 void DialogAFProperties::OnBnClickedCheckSelfcollision() {
314         UpdateFile();
315         if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Self Collision", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
316                 for ( int i = 0; i < file->bodies.Num(); i++ ) {
317                         file->bodies[i]->selfCollision = file->selfCollision;
318                 }
319                 bodyDlg->LoadFile( file );
320         }
321 }
322
323 void DialogAFProperties::OnEnChangeEditContents() {
324         if ( EditControlEnterHit( &m_editContents ) ) {
325                 UpdateFile();
326                 if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Contents", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
327                         for ( int i = 0; i < file->bodies.Num(); i++ ) {
328                                 file->bodies[i]->contents = file->contents;
329                         }
330                         bodyDlg->LoadFile( file );
331                 }
332         }
333 }
334
335 void DialogAFProperties::OnEnChangeEditClipmask() {
336         if ( EditControlEnterHit( &m_editClipMask ) ) {
337                 UpdateFile();
338                 if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Clip Mask", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
339                         for ( int i = 0; i < file->bodies.Num(); i++ ) {
340                                 file->bodies[i]->clipMask = file->clipMask;
341                         }
342                         bodyDlg->LoadFile( file );
343                 }
344         }
345 }
346
347 void DialogAFProperties::OnEnChangeEditLinearfriction() {
348         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_LINEARFRICTION ) ) ) {
349                 UpdateFile();
350                 if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Linear Friction", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
351                         for ( int i = 0; i < file->bodies.Num(); i++ ) {
352                                 file->bodies[i]->linearFriction = file->defaultLinearFriction;
353                         }
354                         bodyDlg->LoadFile( file );
355                 }
356         }
357         else {
358                 m_linearFriction = EditVerifyFloat( (CEdit *) GetDlgItem( IDC_EDIT_LINEARFRICTION ), false );
359         }
360 }
361
362 void DialogAFProperties::OnDeltaposSpinLinearfriction(NMHDR *pNMHDR, LRESULT *pResult) {
363         LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
364         m_linearFriction = EditSpinFloat( (CEdit *)GetDlgItem( IDC_EDIT_LINEARFRICTION ), pNMUpDown->iDelta < 0 );
365         UpdateFile();
366         *pResult = 0;
367 }
368
369 void DialogAFProperties::OnEnChangeEditAngularfriction() {
370         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_ANGULARFRICTION ) ) ) {
371                 UpdateFile();
372                 if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Angular Friction", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
373                         for ( int i = 0; i < file->bodies.Num(); i++ ) {
374                                 file->bodies[i]->angularFriction = file->defaultAngularFriction;
375                         }
376                         bodyDlg->LoadFile( file );
377                 }
378         }
379         else {
380                 m_angularFriction = EditVerifyFloat( (CEdit *) GetDlgItem( IDC_EDIT_ANGULARFRICTION ), false );
381         }
382 }
383
384 void DialogAFProperties::OnDeltaposSpinAngularfriction(NMHDR *pNMHDR, LRESULT *pResult) {
385         LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
386         m_angularFriction = EditSpinFloat( (CEdit *)GetDlgItem( IDC_EDIT_ANGULARFRICTION ), pNMUpDown->iDelta < 0 );
387         UpdateFile();
388         *pResult = 0;
389 }
390
391 void DialogAFProperties::OnEnChangeEditContactfriction() {
392         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_CONTACTFRICTION ) ) ) {
393                 UpdateFile();
394                 if ( file && file->bodies.Num() && MessageBox( "Apply to all bodies ?", "Contact Friction", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
395                         for ( int i = 0; i < file->bodies.Num(); i++ ) {
396                                 file->bodies[i]->contactFriction = file->defaultContactFriction;
397                         }
398                         bodyDlg->LoadFile( file );
399                 }
400         }
401         else {
402                 m_contactFriction = EditVerifyFloat( (CEdit *) GetDlgItem( IDC_EDIT_CONTACTFRICTION ), false );
403         }
404 }
405
406 void DialogAFProperties::OnDeltaposSpinContactfriction(NMHDR *pNMHDR, LRESULT *pResult) {
407         LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
408         m_contactFriction = EditSpinFloat( (CEdit *)GetDlgItem( IDC_EDIT_CONTACTFRICTION ), pNMUpDown->iDelta < 0 );
409         UpdateFile();
410         *pResult = 0;
411 }
412
413 void DialogAFProperties::OnEnChangeEditConstraintfriction() {
414         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_CONSTRAINTFRICTION ) ) ) {
415                 UpdateFile();
416                 if ( file && file->constraints.Num() && MessageBox( "Apply to all constraints ?", "Constraint Friction", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
417                         for ( int i = 0; i < file->constraints.Num(); i++ ) {
418                                 file->constraints[i]->friction = file->defaultConstraintFriction;
419                         }
420                         constraintDlg->LoadFile( file );
421                 }
422         }
423         else {
424                 EditVerifyFloat( (CEdit *) GetDlgItem( IDC_EDIT_CONSTRAINTFRICTION ), false );
425         }
426 }
427
428 void DialogAFProperties::OnDeltaposSpinConstraintfriction(NMHDR *pNMHDR, LRESULT *pResult) {
429         LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
430         m_constraintFriction = EditSpinFloat( (CEdit *)GetDlgItem( IDC_EDIT_CONSTRAINTFRICTION ), pNMUpDown->iDelta < 0 );
431         UpdateFile();
432         *pResult = 0;
433 }
434
435 void DialogAFProperties::OnEnChangeEditTotalmass() {
436         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_TOTALMASS ) ) ) {
437                 UpdateFile();
438         }
439 }
440
441 void DialogAFProperties::OnDeltaposSpinTotalmass(NMHDR *pNMHDR, LRESULT *pResult) {
442         LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
443         m_totalMass = EditSpinFloat( (CEdit *)GetDlgItem( IDC_EDIT_TOTALMASS ), pNMUpDown->iDelta < 0 );
444         UpdateFile();
445         *pResult = 0;
446 }
447
448 void DialogAFProperties::OnEnChangeEditLinearvelocity() {
449         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_LINEARVELOCITY ) ) ) {
450                 UpdateFile();
451         }
452 }
453
454 void DialogAFProperties::OnEnChangeEditAngularvelocity() {
455         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_ANGULARVELOCITY ) ) ) {
456                 UpdateFile();
457         }
458 }
459
460 void DialogAFProperties::OnEnChangeEditLinearacceleration() {
461         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_LINEARACCELERATION ) ) ) {
462                 UpdateFile();
463         }
464 }
465
466 void DialogAFProperties::OnEnChangeEditAngularacceleration() {
467         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_ANGULARACCELERATION ) ) ) {
468                 UpdateFile();
469         }
470 }
471
472 void DialogAFProperties::OnEnChangeEditNomovetime() {
473         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_NO_MOVE_TIME ) ) ) {
474                 UpdateFile();
475         }
476 }
477
478 void DialogAFProperties::OnEnChangeEditMinimummovetime() {
479         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_MINIMUM_MOVE_TIME ) ) ) {
480                 UpdateFile();
481         }
482 }
483
484 void DialogAFProperties::OnEnChangeEditMaximummovetime() {
485         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_MAXIMUM_MOVE_TIME ) ) ) {
486                 UpdateFile();
487         }
488 }
489
490 void DialogAFProperties::OnEnChangeEditLineartolerance() {
491         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_LINEAR_TOLERANCE ) ) ) {
492                 UpdateFile();
493         }
494 }
495
496 void DialogAFProperties::OnEnChangeEditAngulartolerance() {
497         if ( EditControlEnterHit( (CEdit *) GetDlgItem( IDC_EDIT_ANGULAR_TOLERANCE ) ) ) {
498                 UpdateFile();
499         }
500 }
501
502 void DialogAFProperties::OnBnClickedButtonBrowseModel() {
503 //      m_editModel.SetWindowText( str );
504 //      UpdateFile();
505 }
506
507 void DialogAFProperties::OnBnClickedButtonBrowseSkin() {
508 //      m_editSkin.SetWindowText( str );
509 //      UpdateFile();
510         // reload the .af file
511 //      AFDialogReloadFile();
512 }