1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "object_viewer.h"
20 #include "constraint_mesh_dlg.h"
22 #include "nel/3d/ps_mesh.h"
25 //============================================================================================
26 CConstraintMeshDlg::CConstraintMeshDlg(NL3D::CPSConstraintMesh
*cm
, CWnd
* pParent
/*=NULL*/)
27 : _CM(cm
), CDialog(CConstraintMeshDlg::IDD
, pParent
)
30 //{{AFX_DATA_INIT(CConstraintMeshDlg)
31 m_ForceStage0Modulation
= _CM
->isStageModulationForced(0);
32 m_ForceStage1Modulation
= _CM
->isStageModulationForced(1);
33 m_ForceStage2Modulation
= _CM
->isStageModulationForced(2);
34 m_ForceStage3Modulation
= _CM
->isStageModulationForced(3);
35 m_ForceVertexColorLighting
= _CM
->isVertexColorLightingForced();
39 //============================================================================================
40 void CConstraintMeshDlg::DoDataExchange(CDataExchange
* pDX
)
42 CDialog::DoDataExchange(pDX
);
43 //{{AFX_DATA_MAP(CConstraintMeshDlg)
44 DDX_Check(pDX
, IDC_FORCE_STAGE_0_MODULATION
, m_ForceStage0Modulation
);
45 DDX_Check(pDX
, IDC_FORCE_STAGE_1_MODULATION
, m_ForceStage1Modulation
);
46 DDX_Check(pDX
, IDC_FORCE_STAGE_2_MODULATION
, m_ForceStage2Modulation
);
47 DDX_Check(pDX
, IDC_FORCE_STAGE_3_MODULATION
, m_ForceStage3Modulation
);
48 DDX_Check(pDX
, IDC_FORCE_VERTEX_COLOR_LIGHTING
, m_ForceVertexColorLighting
);
52 //============================================================================================
53 void CConstraintMeshDlg::init(sint x
, sint y
, CWnd
*pParent
)
55 Create(IDD_CONSTRAINT_MESH_DLG
, pParent
);
58 MoveWindow(x
, y
, r
.right
, r
.bottom
);
62 BEGIN_MESSAGE_MAP(CConstraintMeshDlg
, CDialog
)
63 //{{AFX_MSG_MAP(CConstraintMeshDlg)
64 ON_BN_CLICKED(IDC_FORCE_STAGE_0_MODULATION
, OnForceStage0Modulation
)
65 ON_BN_CLICKED(IDC_FORCE_STAGE_1_MODULATION
, OnForceStage1Modulation
)
66 ON_BN_CLICKED(IDC_FORCE_STAGE_2_MODULATION
, OnForceStage2Modulation
)
67 ON_BN_CLICKED(IDC_FORCE_STAGE_3_MODULATION
, OnForceStage3Modulation
)
68 ON_BN_CLICKED(IDC_FORCE_VERTEX_COLOR_LIGHTING
, OnForceVertexColorLighting
)
72 //============================================================================================
73 BOOL
CConstraintMeshDlg::OnInitDialog()
75 CDialog::OnInitDialog();
77 // TODO: Add extra initialization here
79 return TRUE
; // return TRUE unless you set the focus to a control
80 // EXCEPTION: OCX Property Pages should return FALSE
83 void CConstraintMeshDlg::OnForceStage0Modulation()
86 _CM
->forceStageModulationByColor(0, m_ForceStage0Modulation
? true : false /* VC WARNING */);
89 void CConstraintMeshDlg::OnForceStage1Modulation()
92 _CM
->forceStageModulationByColor(1, m_ForceStage0Modulation
? true : false /* VC WARNING */);
95 void CConstraintMeshDlg::OnForceStage2Modulation()
98 _CM
->forceStageModulationByColor(2, m_ForceStage0Modulation
? true : false /* VC WARNING */);
101 void CConstraintMeshDlg::OnForceStage3Modulation()
104 _CM
->forceStageModulationByColor(3, m_ForceStage0Modulation
? true : false /* VC WARNING */);
107 void CConstraintMeshDlg::OnForceVertexColorLighting()
110 _CM
->forceVertexColorLighting(m_ForceVertexColorLighting
? true : false /* VC WARNING */);