29 #include "../../idlib/precompiled.h"
32 #include "../../sys/win32/rc/AFEditor_resource.h"
44 #ifdef ID_DEBUG_MEMORY
68 for (
int i = 0; constraintTypes[
i].
name;
i++ ) {
69 if ( constraintTypes[
i].type == type ) {
70 return constraintTypes[
i].
name;
77 for (
int i = 0; constraintTypes[
i].
name;
i++ ) {
79 return constraintTypes[
i].
type;
112 , constraintDlg(NULL)
115 EnableToolTips(
TRUE );
132 CDialog::DoDataExchange(pDX);
214 constraintDlg->MoveWindow( 0, 117, rect.right - rect.left, rect.bottom - rect.top );
323 if ( GetStyle() & WS_VISIBLE ) {
378 CDialog::OnInitDialog();
382 for (
int i = 0; constraintTypes[
i].
name;
i++ ) {
418 CDialog::OnToolHitTest( point, pTI );
423 ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
424 ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
450 CDialog::OnShowWindow( bShow, nStatus );
465 if ( nameDlg.DoModal() == IDOK ) {
479 CString
name, newName;
491 if ( nameDlg.DoModal() == IDOK ) {
514 if ( MessageBox(
"Are you sure you want to delete this constraint ?",
"Delete Constraint", MB_YESNO | MB_ICONQUESTION ) == IDYES ) {
557 LPNMUPDOWN pNMUpDown =
reinterpret_cast<LPNMUPDOWN
>(pNMHDR);
CComboBox m_comboConstraintList
BOOL DefaultOnToolTipNotify(const toolTip_t *toolTips, UINT id, NMHDR *pNMHDR, LRESULT *pResult)
DialogAFConstraintSpring * springDlg
void InitNewRenameDeleteButtons(void)
idList< idDeclAF_Constraint * > constraints
const char * ConstraintTypeToString(declAFConstraintType_t type)
virtual ~DialogAFConstraint()
#define IDC_COMBO_CONSTRAINTS
virtual void AF_UpdateEntities(const char *fileName)
void LoadConstraint(idDeclAF_Constraint *c)
idCVarSystem * cvarSystem
declAFConstraintType_t type
void LoadFile(idDeclAF *af)
void GetName(CString &str)
#define IDD_DIALOG_AF_CONSTRAINT
int SetSafeComboBoxSelection(CComboBox *combo, const char *string, int skip)
CONST PIXELFORMATDESCRIPTOR UINT
#define IDC_COMBO_CONSTRAINT_BODY2
void LoadFile(idDeclAF *af)
afx_msg void OnBnClickedButtonNewconstraint()
afx_msg void OnCbnSelchangeComboConstraints()
virtual BOOL OnInitDialog()
void SetComboBox(CComboBox *combo)
const char * GetName(void) const
virtual void SetCVarString(const char *name, const char *value, int flags=0)=0
GLuint GLuint GLsizei GLenum type
void LoadConstraint(idDeclAF_Constraint *c)
void SaveConstraint(void)
void DeleteConstraint(const char *name)
void LoadFile(idDeclAF *af)
int Icmp(const char *text) const
CComboBox m_comboBody1List
void NewConstraint(const char *name)
afx_msg void OnEnChangeEditConstraintFriction()
void LoadFile(idDeclAF *af)
DialogAFConstraintFixed * fixedDlg
afx_msg void OnBnClickedButtonRenameconstraint()
afx_msg void OnDeltaposSpinConstraintFriction(NMHDR *pNMHDR, LRESULT *pResult)
void LoadConstraint(idDeclAF_Constraint *c)
void LoadConstraint(idDeclAF_Constraint *c)
static toolTip_t toolTips[]
afx_msg void OnCbnSelchangeComboConstraintBody2()
#define IDC_COMBO_CONSTRAINT_TYPE
void LoadConstraint(idDeclAF_Constraint *c)
void InitConstraintList(void)
void LoadConstraint(idDeclAF_Constraint *c)
afx_msg void OnBnClickedButtonDeleteconstraint()
void LoadFile(idDeclAF *af)
void LoadFile(idDeclAF *af)
int DefaultOnToolHitTest(const toolTip_t *toolTips, const CDialog *dialog, CPoint point, TOOLINFO *pTI)
int UnsetSafeComboBoxSelection(CComboBox *combo, CString &string)
void RenameConstraint(const char *oldName, const char *newName)
bool EditControlEnterHit(CEdit *edit)
declAFConstraintType_t StringToConstraintType(const char *str)
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus)
virtual int OnToolHitTest(CPoint point, TOOLINFO *pTI) const
#define IDC_EDIT_CONSTRAINT_FRICTION
DialogAFConstraintBallAndSocket * ballAndSocketDlg
void SetName(CString &str)
#define IDC_SPIN_CONSTRAINT_FRICTION
declAFConstraintType_t type
int GetSafeComboBoxSelection(CComboBox *combo, CString &string, int skip)
virtual void DoDataExchange(CDataExchange *pDX)
void AFDialogSetFileModified(void)
idList< idDeclAF_Body * > bodies
CComboBox m_comboBody2List
afx_msg void OnCbnSelchangeComboConstraintType()
#define IDC_BUTTON_NEWCONSTRAINT
float EditSpinFloat(CEdit *edit, bool up)
const char * c_str(void) const
void LoadConstraint(const char *name)
CComboBox m_comboConstraintType
DialogAFConstraintHinge * hingeDlg
#define IDC_BUTTON_RENAMECONSTRAINT
void InitConstraintTypeDlg(void)
DialogAFConstraintSlider * sliderDlg
idDeclAF_Constraint * constraint
DialogAFConstraintUniversal * universalDlg
afx_msg void OnCbnSelchangeComboConstraintBody1()
#define IDC_COMBO_CONSTRAINT_BODY1
#define IDC_BUTTON_DELETECONSTRAINT
c_type_t constraintTypes[]
float EditVerifyFloat(CEdit *edit, bool allowNegative)