Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / object_viewer / edit_follow_path.cpp
blob08c520d971272f70fa07a6da4249c9e29ec59453
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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/>.
17 // edit_follow_path.cpp : implementation file
20 #include "std_afx.h"
21 #include "object_viewer.h"
22 #include "edit_follow_path.h"
23 #include "popup_notify.h"
24 #include "nel/3d/ps_plane_basis_maker.h"
28 /////////////////////////////////////////////////////////////////////////////
29 // CEditFollowPath dialog
32 CEditFollowPath::CEditFollowPath(NL3D::CPSPlaneBasisFollowSpeed *pbfs, CParticleWorkspace::CNode *ownerNode, CWnd* pParent, IPopupNotify *pn)
33 : CDialog(CEditFollowPath::IDD, pParent), _Node(ownerNode), _PN(pn)
35 nlassert(pbfs);
36 _FollowPath = pbfs;
37 //{{AFX_DATA_INIT(CEditFollowPath)
38 // NOTE: the ClassWizard will add member initialization here
39 //}}AFX_DATA_INIT
42 void CEditFollowPath::init(CWnd *pParent)
44 CDialog::Create(CEditFollowPath::IDD, pParent);
45 ShowWindow(SW_SHOW);
48 void CEditFollowPath::DoDataExchange(CDataExchange* pDX)
50 CDialog::DoDataExchange(pDX);
51 //{{AFX_DATA_MAP(CEditFollowPath)
52 // NOTE: the ClassWizard will add DDX and DDV calls here
53 //}}AFX_DATA_MAP
57 BEGIN_MESSAGE_MAP(CEditFollowPath, CDialog)
58 //{{AFX_MSG_MAP(CEditFollowPath)
59 ON_WM_CLOSE()
60 ON_CBN_SELCHANGE(IDC_PROJECTION_MODE, OnSelchangeProjectionMode)
61 //}}AFX_MSG_MAP
62 END_MESSAGE_MAP()
64 /////////////////////////////////////////////////////////////////////////////
65 // CEditFollowPath message handlers
67 BOOL CEditFollowPath::OnInitDialog()
69 CDialog::OnInitDialog();
70 nlassert(_FollowPath);
71 ((CComboBox *) GetDlgItem(IDC_PROJECTION_MODE))->SetCurSel((int) _FollowPath->getProjectionPlane());
72 return TRUE; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
77 void CEditFollowPath::OnClose()
79 CDialog::OnClose();
80 if (_PN) _PN->childPopupClosed(this);
83 void CEditFollowPath::OnSelchangeProjectionMode()
85 nlassert(_FollowPath);
86 int index= ((CComboBox *) GetDlgItem(IDC_PROJECTION_MODE))->GetCurSel();
87 _FollowPath->setProjectionPlane((NL3D::CPSPlaneBasisFollowSpeed::TProjectionPlane) index);
88 if (_Node) _Node->setModified(true);