Changed: Minor changes

This commit is contained in:
kervala 2016-11-17 10:30:59 +01:00
parent 6c2b248af1
commit 68eb6448fb
4 changed files with 118 additions and 118 deletions

View file

@ -85,7 +85,7 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimationDlg message handlers
void CAnimationDlg::OnEnd()
void CAnimationDlg::OnEnd()
{
UpdateData ();
CurrentFrame=End;
@ -95,7 +95,7 @@ void CAnimationDlg::OnEnd()
updateBar ();
}
void CAnimationDlg::OnPlay()
void CAnimationDlg::OnPlay()
{
// play
UpdateData ();
@ -111,7 +111,7 @@ void CAnimationDlg::OnPlay()
Main->enableFXs(true);
}
void CAnimationDlg::OnStop()
void CAnimationDlg::OnStop()
{
// Is checked ?
UpdateData ();
@ -124,7 +124,7 @@ void CAnimationDlg::OnStop()
Main->enableFXs(false);
}
void CAnimationDlg::OnChangeCurrentFrame()
void CAnimationDlg::OnChangeCurrentFrame()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
@ -133,7 +133,7 @@ void CAnimationDlg::OnChangeCurrentFrame()
// Update values
UpdateData ();
// Clamp current frame
clamp (UICurrentFrame, (int)Start, (int)End);
CurrentFrame=(float)UICurrentFrame;
@ -141,21 +141,21 @@ void CAnimationDlg::OnChangeCurrentFrame()
// Update
updateBar ();
UpdateData (FALSE);
UpdateData (FALSE);
}
void CAnimationDlg::OnChangeEndEdit()
void CAnimationDlg::OnChangeEndEdit()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
// Update values
UpdateData ();
// Clamp current frame
if (End<Start)
Start=End;
@ -167,17 +167,17 @@ void CAnimationDlg::OnChangeEndEdit()
UICurrentFrame=(int)CurrentFrame;
// Update
UpdateData (FALSE);
UpdateData (FALSE);
Main->setAnimTime (Start, End);
}
void CAnimationDlg::OnChangeSpeed()
void CAnimationDlg::OnChangeSpeed()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
UpdateData();
if (Speed<=0.001f)
Speed=0.001f;
@ -187,7 +187,7 @@ void CAnimationDlg::OnChangeSpeed()
Main->setAnimTime (Start, End);
}
void CAnimationDlg::OnStart()
void CAnimationDlg::OnStart()
{
UpdateData ();
CurrentFrame=Start;
@ -197,16 +197,16 @@ void CAnimationDlg::OnStart()
updateBar ();
}
void CAnimationDlg::OnChangeStartEdit()
void CAnimationDlg::OnChangeStartEdit()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// Update values
UpdateData ();
// Clamp current frame
if (End<Start)
End=Start;
@ -218,11 +218,11 @@ void CAnimationDlg::OnChangeStartEdit()
UICurrentFrame=(int)CurrentFrame;
// Update
UpdateData (FALSE);
UpdateData (FALSE);
Main->setAnimTime (Start, End);
}
void CAnimationDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
void CAnimationDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your message handler code here and/or call default
@ -290,7 +290,7 @@ void CAnimationDlg::handle ()
float backup = CurrentFrame;
CurrentFrame=(float)fmod ((CurrentFrame-Start), End-Start)+Start;
if (backup!=CurrentFrame)
{
{
LastFrame = CurrentFrame;
Main->enableFXs(false);
Main->enableFXs(true);
@ -306,7 +306,7 @@ void CAnimationDlg::handle ()
// Stop animation
OnStop ();
}
if (CurrentFrame<Start)
{
@ -331,10 +331,10 @@ void CAnimationDlg::handle ()
LastTime=newTime;
}
BOOL CAnimationDlg::OnInitDialog()
BOOL CAnimationDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Stop
LastTime=NLMISC::CTime::getLocalTime ();
StopCtrl.SetCheck (1);
@ -345,7 +345,7 @@ BOOL CAnimationDlg::OnInitDialog()
// Update the time line
updateBar ();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
@ -363,7 +363,7 @@ void CAnimationDlg::updateBar ()
{
// Update value
UpdateData();
// Set cursor position
int position;
if (fabs (End-Start)<0.00001f)
@ -389,7 +389,7 @@ NL3D::TAnimationTime CAnimationDlg::getLastTime ()
return LastFrame/Speed;
}
void CAnimationDlg::OnDestroy()
void CAnimationDlg::OnDestroy()
{
setRegisterWindowState (this, REGKEY_OBJ_VIEW_ANIMATION_DLG);
@ -412,9 +412,9 @@ void CAnimationDlg::setCurrentFrame (float currentFrame)
}
BOOL CAnimationDlg::EnableWindow(BOOL enable /*=TRUE*/)
{
{
PlayCtrl.EnableWindow(Playing && enable);
StopCtrl.EnableWindow(FALSE);
StopCtrl.EnableWindow(FALSE);
FRWCtrl.EnableWindow(enable);
FFWCtrl.EnableWindow(enable);
TimeLineCtrl.EnableWindow(enable);

View file

@ -46,7 +46,7 @@ public:
CButton StopCtrl;
float End;
float Speed;
float Start;
float Start;
BOOL Loop;
int UICurrentFrame;
BOOL Inplace;

View file

@ -55,10 +55,10 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLBExternIDDlg message handlers
BOOL CLBExternIDDlg::OnInitDialog()
BOOL CLBExternIDDlg::OnInitDialog()
{
CDialog::OnInitDialog();
GetDlgItem(IDC_ID_VALUE)->EnableWindow(_ID != 0);
((CButton *) GetDlgItem(IDC_ENABLE_EXTERN_ID))->SetCheck(_ID != 0 ? 1 : 0);
@ -70,17 +70,17 @@ BOOL CLBExternIDDlg::OnInitDialog()
#ifdef NL_LITTLE_ENDIAN
val[k] = (unsigned char) (_ID >> ((3 - k) << 3));
#else
val[k] = (unsigned char) (_ID >> (k << 3));
val[k] = (unsigned char) (_ID >> (k << 3));
#endif
}
val[4] = '\0';
val[4] = '\0';
GetDlgItem(IDC_ID_VALUE)->SetWindowText(val);
}
else
{
_ID = 0;
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
@ -90,14 +90,14 @@ static uint32 StringToID(const char *buf)
{
uint32 id;
#ifdef NL_LITTLE_ENDIAN
id = ((uint32) buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]);
id = ((uint32) buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]);
#else
id = *(uint32 *) buf;
id = *(uint32 *) buf;
#endif
return id;
}
void CLBExternIDDlg::OnEnableExternId()
void CLBExternIDDlg::OnEnableExternId()
{
if (_ID == 0)
{
@ -110,11 +110,11 @@ void CLBExternIDDlg::OnEnableExternId()
GetDlgItem(IDC_ID_VALUE)->EnableWindow(FALSE);
GetDlgItem(IDC_ID_VALUE)->SetWindowText("");
_ID = 0;
}
}
}
void CLBExternIDDlg::OnChangeIdValue()
{
void CLBExternIDDlg::OnChangeIdValue()
{
if (!((CButton *) GetDlgItem(IDC_ENABLE_EXTERN_ID))->GetCheck()) return;
char buf[6];
::memset(buf, 0, 6);
@ -133,7 +133,7 @@ void CLBExternIDDlg::OnChangeIdValue()
else
{
GetDlgItem(IDOK)->EnableWindow(FALSE);
GetDlgItem(IDC_ENABLE_EXTERN_ID)->EnableWindow(FALSE);
GetDlgItem(IDC_ENABLE_EXTERN_ID)->EnableWindow(FALSE);
}
}

View file

@ -42,7 +42,7 @@
#include "ribbon_dlg.h"
using NL3D::CPSLocatedBindable;
using NL3D::CPSLocatedBindable;
/////////////////////////////////////////////////////////////////////////////
@ -55,7 +55,7 @@ CLocatedBindableDialog::CLocatedBindableDialog(CParticleWorkspace::CNode *ownerN
{
//{{AFX_DATA_INIT(CLocatedBindableDialog)
m_IndependantSizes = FALSE;
//}}AFX_DATA_INIT
//}}AFX_DATA_INIT
}
/// dtor
@ -78,7 +78,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
NL3D::CParticleSystem *ps = _Bindable->getOwner()->getOwner();
if (ps->isSharingEnabled())
{
{
GetDlgItem(IDC_NO_AUTO_LOD)->ShowWindow(TRUE);
if (ps->isAutoLODEnabled() == false)
{
@ -111,7 +111,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
NL3D::CPSMaterial *material = dynamic_cast<NL3D::CPSMaterial *>(_Bindable);
// blending mode
m_BlendingMode.SetCurSel((uint) material->getBlendingMode() );
// z-test
// z-test
((CButton *) GetDlgItem(IDC_ZTEST))->SetCheck(material->isZTestEnabled() ? BST_CHECKED : BST_UNCHECKED);
// z-bias
GetDlgItem(IDC_ZBIAS)->SetWindowText(NLMISC::toString("%.2f", -material->getZBias()).c_str());
@ -126,7 +126,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
}
GetDlgItem(IDC_ALIGN_ON_MOTION)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_ZALIGN)->ShowWindow(SW_HIDE);
// enable disable z-test
// enable disable z-test
//
if (dynamic_cast<NL3D::CPSParticle *>(_Bindable))
{
@ -147,12 +147,12 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
// check support for color
if (dynamic_cast<NL3D::CPSColoredParticle *>(_Bindable))
{
CAttribDlgRGBA *ad = new CAttribDlgRGBA("PARTICLE_COLOR", _Node);
pushWnd(ad);
_ColorWrapper.S = dynamic_cast<NL3D::CPSColoredParticle *>(_Bindable);
ad->setWrapper(&_ColorWrapper);
_ColorWrapper.S = dynamic_cast<NL3D::CPSColoredParticle *>(_Bindable);
ad->setWrapper(&_ColorWrapper);
ad->setSchemeWrapper(&_ColorWrapper);
HBITMAP bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_PARTICLE_COLOR));
@ -169,13 +169,13 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
// check support for angle 2D
if (dynamic_cast<NL3D::CPSRotated2DParticle *>(_Bindable))
{
CAttribDlgFloat *ad = new CAttribDlgFloat("PARTICLE_ANGLE2D", _Node, 0.f, 256.f);
pushWnd(ad);
_Angle2DWrapper.S = dynamic_cast<NL3D::CPSRotated2DParticle *>(_Bindable);
ad->setWrapper(&_Angle2DWrapper);
ad->setSchemeWrapper(&_Angle2DWrapper);
ad->setWrapper(&_Angle2DWrapper);
ad->setSchemeWrapper(&_Angle2DWrapper);
HBITMAP bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_PARTICLE_ANGLE));
ad->init(bmh, xPos, yPos, this);
@ -183,7 +183,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
yPos += rect.bottom + 3;
}
CAttribDlgPlaneBasis *pb = NULL;
@ -199,7 +199,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
pb->init(bmh, xPos, yPos, this);
pb->GetClientRect(&rect);
yPos += rect.bottom + 3;
}
// check support for precomputed rotations
@ -236,14 +236,14 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
_MotionBlurThresholdWrapper.P = fla;
mbc->setWrapper(&_MotionBlurThresholdWrapper);
mbc->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
_MotionBlurWnd.push_back(s);
s->Create("Fake motion blur threshold.", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->SetFont(CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT)));
s->ShowWindow(SW_SHOW);
mbc->GetClientRect(&rect);
yPos += rect.bottom + 3;
yPos += rect.bottom + 3;
GetDlgItem(IDC_ALIGN_ON_MOTION)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_ZALIGN)->ShowWindow(SW_SHOW);
((CButton *) GetDlgItem(IDC_ALIGN_ON_MOTION))->SetCheck(fla->getAlignOnMotion());
@ -256,7 +256,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
{
NL3D::CPSShockWave *sw = static_cast<NL3D::CPSShockWave *>(_Bindable);
CEditableRangeFloat *rc = new CEditableRangeFloat(std::string("RADIUS CUT"), _Node, 0, 1);
pushWnd(rc);
pushWnd(rc);
_RadiusCutWrapper.S = sw;
rc->setWrapper(&_RadiusCutWrapper);
rc->init(xPos + 140, yPos, this);
@ -277,7 +277,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
snbs->setWrapper(&_ShockWaveNbSegWrapper);
snbs->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Nb segs", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->ShowWindow(SW_SHOW);
@ -291,13 +291,13 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
_ShockWaveUFactorWrapper.S = sw;
uvd->setWrapper(&_ShockWaveUFactorWrapper);
uvd->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Texture U factor :", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->ShowWindow(SW_SHOW);
uvd->GetClientRect(&rect);
yPos += rect.bottom + 3;
yPos += rect.bottom + 3;
}
// fanlight
@ -325,7 +325,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
_FanLightSmoothnessWrapper.P = static_cast<NL3D::CPSFanLight *>(_Bindable);
nbf->setWrapper(&_FanLightSmoothnessWrapper);
nbf->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Phase smoothnes:", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->ShowWindow(SW_SHOW);
@ -334,11 +334,11 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
yPos += rect.bottom + 3;
CEditableRangeFloat *nbfp = new CEditableRangeFloat(std::string("FAN_LIGHT_PHASE"), _Node, 0, 4.f);
pushWnd(nbfp);
pushWnd(nbfp);
_FanLightPhaseWrapper.P = static_cast<NL3D::CPSFanLight *>(_Bindable);
nbfp->setWrapper(&_FanLightPhaseWrapper);
nbfp->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Fan light speed :", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->ShowWindow(SW_SHOW);
@ -347,11 +347,11 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
yPos += rect.bottom + 3;
nbfp = new CEditableRangeFloat(std::string("FAN_LIGHT_INTENSITY"), _Node, 0, 4.f);
pushWnd(nbfp);
pushWnd(nbfp);
_FanLightIntensityWrapper.P = static_cast<NL3D::CPSFanLight *>(_Bindable);
nbfp->setWrapper(&_FanLightIntensityWrapper);
nbfp->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Fan light intensity:", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->ShowWindow(SW_SHOW);
@ -383,8 +383,8 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
{
nbs->enableUpperBound(256, true);
}
_TailParticleWrapper.P = dynamic_cast<NL3D::CPSTailParticle *>(_Bindable);
nbs->setWrapper(&_TailParticleWrapper);
nbs->init(xPos + 140, yPos, this);
@ -400,7 +400,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
CTailParticleDlg *tpd = new CTailParticleDlg(_Node, dynamic_cast<NL3D::CPSTailParticle *>(_Bindable));
pushWnd(tpd);
tpd->init(this, xPos, yPos);
tpd->GetClientRect(&rect);
yPos += rect.bottom + 3;
}
@ -429,7 +429,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
cmtd->GetClientRect(&rect);
yPos += rect.bottom + 3;
pushWnd(cmd);
pushWnd(cmtd);
pushWnd(cmtd);
}
@ -440,9 +440,9 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
CTextureAnimDlg *td = new CTextureAnimDlg(_Node,
dynamic_cast<NL3D::CPSTexturedParticle *>(_Bindable),
dynamic_cast<NL3D::CPSMultiTexturedParticle *>(_Bindable)
);
);
pushWnd(td);
td->init(xPos, yPos, this);
td->GetClientRect(&rect);
yPos += rect.bottom + 3;
@ -453,7 +453,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
{
NL3D::CPSTexturedParticleNoAnim *tp = dynamic_cast<NL3D::CPSTexturedParticleNoAnim *>(_Bindable);
_TextureNoAnimWrapper.TP = tp;
CTextureChooser *tc = new CTextureChooser(dynamic_cast<NL3D::CPSMultiTexturedParticle *>(_Bindable), _Node);
CTextureChooser *tc = new CTextureChooser(dynamic_cast<NL3D::CPSMultiTexturedParticle *>(_Bindable), _Node);
tc->enableRemoveButton();
tc->setWrapper(&_TextureNoAnimWrapper);
pushWnd(tc);
@ -465,8 +465,8 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
// ribbon texture (doesn't support texture animation for now)
if (dynamic_cast<NL3D::CPSRibbon *>(_Bindable))
{
{
// add dialog for uv tuning with ribbon
CEditableRangeFloat *uvd = new CEditableRangeFloat(std::string("RIBBON UFACTOR"), _Node, 0, 5);
pushWnd(uvd);
@ -486,7 +486,7 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
_RibbonVFactorWrapper.R = static_cast<NL3D::CPSRibbon *>(_Bindable);
uvd->setWrapper(&_RibbonVFactorWrapper);
uvd->init(xPos + 140, yPos, this);
s = new CStatic;
s = new CStatic;
pushWnd(s);
s->Create("Texture V factor :", SS_LEFT, CRect(xPos, yPos + 16, xPos + 139, yPos + 48), this);
s->SetFont(CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT)));
@ -494,11 +494,11 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
uvd->GetClientRect(&rect);
yPos += rect.bottom + 3;
}
}
if (dynamic_cast<NL3D::CPSRibbonBase *>(_Bindable))
{
{
// add dialog for uv tuning with ribbon
CEditableRangeFloat *sd = new CEditableRangeFloat(std::string("SEGMENT DURATION"), _Node, 0.05f, 0.5f);
sd->enableLowerBound(0, true);
@ -514,13 +514,13 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
sd->GetClientRect(&rect);
yPos += rect.bottom + 3;
}
// 'look at' independant sizes
bool isLookAt = dynamic_cast<NL3D::CPSFaceLookAt *>(_Bindable) != NULL;
bool isLookAt = dynamic_cast<NL3D::CPSFaceLookAt *>(_Bindable) != NULL;
GetDlgItem(IDC_INDE_SIZES)->ShowWindow(isLookAt ? SW_SHOW : SW_HIDE);
GetDlgItem(IDC_SIZE_WIDTH)->ShowWindow(isLookAt ? SW_SHOW : SW_HIDE);
GetDlgItem(IDC_SIZE_HEIGHT)->ShowWindow(isLookAt ? SW_SHOW : SW_HIDE);
GetDlgItem(IDC_WIDTH_HEIGHT_BOX)->ShowWindow(isLookAt ? SW_SHOW : SW_HIDE);
GetDlgItem(IDC_WIDTH_HEIGHT_BOX)->ShowWindow(isLookAt ? SW_SHOW : SW_HIDE);
((CButton *) GetDlgItem(IDC_SIZE_WIDTH))->SetCheck(1);
if (isLookAt)
{
@ -539,8 +539,8 @@ void CLocatedBindableDialog::init(CParticleDlg* pParent)
pushWnd(rd);
rd->GetClientRect(&rect);
yPos += rect.bottom + 3;
}
}
}
}
UpdateData();
}
@ -580,7 +580,7 @@ END_MESSAGE_MAP()
void CLocatedBindableDialog::touchPSState()
{
if (_Node && _Node->getPSModel())
{
{
_Node->getPSModel()->touchTransparencyState();
_Node->getPSModel()->touchLightableState();
}
@ -588,19 +588,19 @@ void CLocatedBindableDialog::touchPSState()
//***********************************************************************************
void CLocatedBindableDialog::OnSelchangeBlendingMode()
void CLocatedBindableDialog::OnSelchangeBlendingMode()
{
UpdateData();
NL3D::CPSMaterial *m = dynamic_cast<NL3D::CPSMaterial *>(_Bindable);
nlassert(m);
m->setBlendingMode( (NL3D::CPSMaterial::TBlendingMode) m_BlendingMode.GetCurSel());
touchPSState();
m->setBlendingMode( (NL3D::CPSMaterial::TBlendingMode) m_BlendingMode.GetCurSel());
touchPSState();
updateModifiedFlag();
}
//***********************************************************************************
void CLocatedBindableDialog::updateIndependantSizes()
void CLocatedBindableDialog::updateIndependantSizes()
{
UpdateData();
// make sure we are dealing with 'LookAt' for now
@ -613,7 +613,7 @@ void CLocatedBindableDialog::updateIndependantSizes()
//***********************************************************************************
// user asked for independant sizes
void CLocatedBindableDialog::OnIndeSizes()
void CLocatedBindableDialog::OnIndeSizes()
{
UpdateData();
// make sure we are dealing with 'LookAt' for now
@ -621,13 +621,13 @@ void CLocatedBindableDialog::OnIndeSizes()
NL3D::CPSFaceLookAt *la = static_cast<NL3D::CPSFaceLookAt *>(_Bindable);
la->setIndependantSizes(m_IndependantSizes ? true : false /* VCC warning*/);
updateIndependantSizes();
updateSizeControl();
updateSizeControl();
updateModifiedFlag();
}
//***********************************************************************************
uint CLocatedBindableDialog::updateSizeControl()
{
{
HBITMAP bmh;
if (!dynamic_cast<NL3D::CPSSizedParticle *>(_Bindable)) return 0;
// if a previous control was there, remove it
@ -645,7 +645,7 @@ uint CLocatedBindableDialog::updateSizeControl()
int editWidth = (((CButton *) GetDlgItem(IDC_SIZE_WIDTH))->GetCheck());
_SizeCtrl = new CAttribDlgFloat(editWidth ? "PARTICLE_WIDTH" : "PARTICLE_HEIGHT", _Node, 0.f, 1.f);
if (editWidth) // wrap to the wanted size
{
_SizeWrapper.S = fla;
@ -656,8 +656,8 @@ uint CLocatedBindableDialog::updateSizeControl()
}
_SizeCtrl->setWrapper(&_SizeWrapper);
_SizeCtrl->setSchemeWrapper(&_SizeWrapper);
bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(editWidth ? IDB_PARTICLE_WIDTH : IDB_PARTICLE_HEIGHT));
bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(editWidth ? IDB_PARTICLE_WIDTH : IDB_PARTICLE_HEIGHT));
}
else // general case. Wrap to the size interface and the appropriate dialog
{
@ -666,29 +666,29 @@ uint CLocatedBindableDialog::updateSizeControl()
_SizeWrapper.S = dynamic_cast<NL3D::CPSSizedParticle *>(_Bindable);
_SizeCtrl->setWrapper(&_SizeWrapper);
_SizeCtrl->setSchemeWrapper(&_SizeWrapper);
bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_PARTICLE_SIZE));
bmh = LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_PARTICLE_SIZE));
}
RECT rect;
_SizeCtrl->init(bmh, _SizeCtrlX, _SizeCtrlY, this);
_SizeCtrl->GetClientRect(&rect);
return rect.bottom + 3;
return rect.bottom + 3;
}
//***********************************************************************************
void CLocatedBindableDialog::OnSizeWidth()
void CLocatedBindableDialog::OnSizeWidth()
{
updateSizeControl();
updateSizeControl();
}
//***********************************************************************************
void CLocatedBindableDialog::OnSizeHeight()
void CLocatedBindableDialog::OnSizeHeight()
{
updateSizeControl();
updateSizeControl();
}
//***********************************************************************************
void CLocatedBindableDialog::OnNoAutoLod()
void CLocatedBindableDialog::OnNoAutoLod()
{
NL3D::CPSParticle *p = NLMISC::safe_cast<NL3D::CPSParticle *>(_Bindable);
p->disableAutoLOD(((CButton *) GetDlgItem(IDC_NO_AUTO_LOD))->GetCheck() != 0);
@ -696,8 +696,8 @@ void CLocatedBindableDialog::OnNoAutoLod()
}
//***********************************************************************************
void CLocatedBindableDialog::OnGlobalColorLighting()
{
void CLocatedBindableDialog::OnGlobalColorLighting()
{
NL3D::CPSParticle *p = NLMISC::safe_cast<NL3D::CPSParticle *>(_Bindable);
p->enableGlobalColorLighting(((CButton *) GetDlgItem(ID_GLOBAL_COLOR_LIGHTING))->GetCheck() == 1);
touchPSState();
@ -705,12 +705,12 @@ void CLocatedBindableDialog::OnGlobalColorLighting()
}
//***********************************************************************************
void CLocatedBindableDialog::OnAlignOnMotion()
void CLocatedBindableDialog::OnAlignOnMotion()
{
bool align = ((CButton *) GetDlgItem(IDC_ALIGN_ON_MOTION))->GetCheck() != 0;
NL3D::CPSFaceLookAt *fla = NLMISC::safe_cast<NL3D::CPSFaceLookAt *>(_Bindable);
fla->setAlignOnMotion(align);
updateValidWndForAlignOnMotion(align);
updateValidWndForAlignOnMotion(align);
updateModifiedFlag();
}
@ -723,10 +723,10 @@ void CLocatedBindableDialog::updateValidWndForAlignOnMotion(bool align)
CEditAttribDlg *ead = dynamic_cast<CEditAttribDlg *>(_MotionBlurWnd[k]);
if (ead)
{
ead->EnableWindow(enable); // enable window not virtual in CWnd ...
ead->EnableWindow(enable); // enable window not virtual in CWnd ...
}
else
{
{
_MotionBlurWnd[k]->EnableWindow(enable);
}
}
@ -734,7 +734,7 @@ void CLocatedBindableDialog::updateValidWndForAlignOnMotion(bool align)
}
//***********************************************************************************
void CLocatedBindableDialog::OnZtest()
void CLocatedBindableDialog::OnZtest()
{
UpdateData();
NL3D::CPSMaterial *mat = dynamic_cast<NL3D::CPSMaterial *>(_Bindable);
@ -762,7 +762,7 @@ void CLocatedBindableDialog::updateZBias()
{
CString value;
m_ZBias.GetWindowText(value);
float zbias = 0.f;
float zbias = 0.f;
int dummy; // to test if end of string as no not wanted extra characters
if (sscanf((LPCTSTR) (value + "\n0"), "%f\n%d", &zbias, &dummy) == 2)
{
@ -782,28 +782,28 @@ void CLocatedBindableDialog::updateZBias()
}
//***************************************************************************************************************************
void CLocatedBindableDialog::OnChangeZbias()
void CLocatedBindableDialog::OnChangeZbias()
{
UpdateData();
UpdateData();
// Trick to track "Enter" keypress: CEdit are multiline. If GetLineCount()>1, then
// user has press enter.
if(m_ZBias.GetLineCount()>1)
{
// must ccat 2 lines of the CEdit.
concatEdit2Lines(m_ZBias);
updateZBias();
concatEdit2Lines(m_ZBias);
updateZBias();
}
}
//***************************************************************************************************************************
void CLocatedBindableDialog::OnKillfocusZbias()
void CLocatedBindableDialog::OnKillfocusZbias()
{
updateZBias();
updateZBias();
}
//***************************************************************************************************************************
void CLocatedBindableDialog::OnZalign()
{
void CLocatedBindableDialog::OnZalign()
{
bool align = ((CButton *) GetDlgItem(IDC_ZALIGN))->GetCheck() != 0;
NL3D::CPSFaceLookAt *fla = NLMISC::safe_cast<NL3D::CPSFaceLookAt *>(_Bindable);
fla->setAlignOnZAxis(align);