/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2008.01.24 * ³» ¿ë : Æ÷Å» ´ÙÀ̾ó·Î±× * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "Button.h" #include "NumericEdit.h" #include "Resource.h" class cPortalInfo; class cPortalSceneNode; /// Æ÷Å» ´ÙÀ̾ó·Î±× class cPortalDialog : public CDialog { DECLARE_DYNAMIC(cPortalDialog) public: cPortalDialog(); ~cPortalDialog(); void SelectNode( cPortalSceneNode* node ); /// µ¥ÀÌŸ °»½Å void UpdateList( const tMap& infoMap ); void UpdateNodeTransform( cPortalSceneNode* node ); /// Ȱ¼ºÈ­ ¿©ºÎ void SetEnabled( bool enabled ); /// À§Ä¡ NiPoint3 GetTranslate() const; /// ȸÀü float GetRotateAngle() const; protected: virtual void DoDataExchange( CDataExchange* dx ); BOOL OnInitDialog(); protected: afx_msg void OnClickedSave(); afx_msg void OnClickedCreate(); afx_msg void OnClickedDelete(); afx_msg void OnSelchangeNode(); afx_msg void OnSelchangeTargetIndex(); afx_msg LRESULT OnChangedNumber( WPARAM id, LPARAM ); afx_msg void OnCheckedButton(); DECLARE_MESSAGE_MAP() private: cButton mSaveButton; cButton mCreateButton; cButton mDeleteButton; /// À妽º cNumericEdit mIndexNum; /// ¹üÀ§ cNumericEdit mRangeNum; /// À̵¿ cNumericEdit mTxNum; cNumericEdit mTyNum; /// ȸÀü cNumericEdit mRzNum; /// À̸§ ³ôÀ̰ª cNumericEdit mNameHeightNum; /// cPortalInfo* mSelInfo; }; inline void cPortalDialog::SetEnabled( bool enabled ) { if( enabled ) { mRangeNum.SetEnabled( true ); mTxNum.SetEnabled( true ); mTyNum.SetEnabled( true ); mRzNum.SetEnabled( true ); } else { GetDlgItem(IDC_EDIT_PORTAL_INDEX)->SetWindowText( "" ); mRangeNum.SetEnabled( false ); mTxNum.SetEnabled( false ); mTyNum.SetEnabled( false ); mRzNum.SetEnabled( false ); } } inline NiPoint3 cPortalDialog::GetTranslate() const { float x = mTxNum.GetValue() * 100; float y = mTyNum.GetValue() * 100; return NiPoint3( x, y, 0.0f ); } inline float cPortalDialog::GetRotateAngle() const { return D3DXToRadian( mRzNum.GetValue() ); }