/* ========================================================================== * ÆÄ ÀÏ : ArcGauge.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2007-02-16 * ÁÖÀÇ»çÇ× : ¹Ý È£·Î µÈ °ÔÀÌÁö ±¸Çö ( È÷¾î·Î ¿øÇü°ÔÀÌÁö ) *===========================================================================*/ #pragma once class cPlaneObject; class cArcGauge { public: cArcGauge(); virtual ~cArcGauge(); /// »ý¼ººÎ (¸ðµÎ Àý´ë ÁÂÇ¥´Ù!!) bool Create( NiTexture* pTexture, unsigned short texLeft, unsigned short texTop, unsigned short texRight,unsigned short texBottom ); /// Ãâ·ÂºÎ void Draw(); /// À§Ä¡ ¼ÂÆÃ (Àý´ë ÁÂÇ¥¸¦ ³ÖÀÚ!!) void SetPos( short x, short y ); /// °ÔÀÌÁö ÇöÀç °ª void SetCurrentValue( float curvalue ); /// °ÔÀÌÁö ÃÖ°í °ª void SetMaxValue( float maxvalue ); /// ¾ËÆÄ ½ÃÀÛ °ª void SetStartRef( unsigned int alphaRef ); protected: /// ¾ËÆÄ°ª °è»ê ¹× ¼¼ÆÃ void CalculateAlphaRef(); protected: /// cPlaneObject* mpPlane; /// ÇöÀç °ª float mCurValue; /// ÃÖ°í °ª float mMaxValue; /// °ÔÀÌÁö À̹ÌÁö¿¡ ¼³Á¤µÈ ÃÖ°í ¾ËÆÄ °ª float mMaxAlphaRef; /// ½ÃÀÛ ¾ËÆÄ °ª unsigned int mStartAlpahRef; }; inline void cArcGauge::SetCurrentValue( float curvalue ) { mCurValue = curvalue; if( mCurValue >= mMaxValue ) mCurValue = mMaxValue; /// ÇöÀç ¾ËÆÄ Àç¼¼ÆÃ CalculateAlphaRef(); } inline void cArcGauge::SetMaxValue( float maxvalue ) { mMaxValue = maxvalue; /// ÇöÀç ¾ËÆÄ Àç¼¼ÆÃ CalculateAlphaRef(); } inline void cArcGauge::SetStartRef( unsigned int alphaRef ) { mStartAlpahRef = alphaRef; }