/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.12.07 * ³» ¿ë : »ç¿îµå ¹èÄ¡ ´ÙÀ̾ó·Î±× * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UI/Dialog.h" #include "UI/Button.h" #include "UI/CheckButton.h" #include "UI/CheckButtonGroup.h" #include "UI/NumericEdit.h" class cGroupSound; /// »ç¿îµå ¹èÄ¡ ´ÙÀ̾ó·Î±× class cSoundTransformDialog : public cDialog { DECLARE_DYNAMIC(cSoundTransformDialog) public: cSoundTransformDialog(); virtual ~cSoundTransformDialog(); void SetCheckedButton( int id ); unsigned int GetCheckedButton() const; /// »ç¿îµå Á¤º¸¸¦ ¼³Á¤ void UpdateSound( const NiPoint3& translate, float radius, float attenDist ); /// Ȱ¼ºÈ­ ¿©ºÎ¸¦ ¼³Á¤ void SetEnabled( bool enabled ); /// À§Ä¡ NiPoint3 GetTranslate() const; /// ¹ÝÁö¸§ float GetRadius() const; /// °¨¼è °Å¸® float GetAttenDistance() const; protected: virtual void DoDataExchange( CDataExchange* dx ); BOOL OnInitDialog(); virtual void OnOK() {} virtual void OnCancel() {} protected: DECLARE_MESSAGE_MAP() afx_msg void OnClickedButton(); afx_msg LRESULT OnChangedTransform( WPARAM id, LPARAM ); private: /// ¹öư cCheckButton mPickButton; cCheckButton mAttachToTerrainButton; cCheckButton mAttachToObjectButton; cCheckButtonGroup mButtonGroup; /// ¼ýÀÚ ¿¡µðÆ® cNumericEdit mTxEdit; cNumericEdit mTyEdit; cNumericEdit mTzEdit; cNumericEdit mRadiusEdit; cNumericEdit mAttenDistEdit; }; inline void cSoundTransformDialog::SetEnabled( bool enabled ) { if( enabled ) { mTxEdit.SetEnabled( true ); mTyEdit.SetEnabled( true ); mTzEdit.SetEnabled( true ); mRadiusEdit.SetEnabled( true ); mAttenDistEdit.SetEnabled( true ); } else { mTxEdit.SetValue( 0.0f ); mTyEdit.SetValue( 0.0f ); mTzEdit.SetValue( 0.0f ); mRadiusEdit.SetValue( 0.0f ); mAttenDistEdit.SetValue( 0.0f ); mTxEdit.SetEnabled( false ); mTyEdit.SetEnabled( false ); mTzEdit.SetEnabled( false ); mRadiusEdit.SetEnabled( false ); mAttenDistEdit.SetEnabled( false ); } } inline NiPoint3 cSoundTransformDialog::GetTranslate() const { float x = mTxEdit.GetValue() * 100.0f; float y = mTyEdit.GetValue() * 100.0f; float z = mTzEdit.GetValue() * 100.0f; return NiPoint3( x, y, z ); } inline float cSoundTransformDialog::GetRadius() const { return mRadiusEdit.GetValue() * 100.0f; } inline float cSoundTransformDialog::GetAttenDistance() const { return mAttenDistEdit.GetValue() * 100.0f; }