/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.06.14 * ³» ¿ë : * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "BaseIcon.h" #include "UIImageFont.h" #include "UIRoundGauge.h" class cPlaneObject; enum eTooltipType; enum eAniType { eANI_AURA, /// ¿À¶ó½ºÅ³ÀÇ Å׵θ® eANI_FLASH, /// ÄðŸÀÓ Á¾·áÈÄ ¹Ý¦ÀÓ eANI_COUNT, /// ÄðŸÀÓ Ä«¿îÆ® ¿ë eANI_MAX, }; /// ¾Ö´Ï¸ÞÀÌ¼Ç ÀÎÀÚ struct sAniParam { short mFrame; /// ÇÁ·¹ÀÓ¼ö unsigned int mTexX, mTexY; /// ÅØ½ºÃÄ ÁÂÇ¥ unsigned int mWidth, mHeight; /// À̹ÌÁö »çÀÌÁî short mCurFrame; /// ÇöÀç ÇÁ·¹ÀÓ bool mAniOn; /// ¾Ö´Ï»ç¿ë¿©ºÎ bool mReturn; /// ¾Ö´Ï¸ÞÀÌ¼Ç ÇѹÙÄû µ¹¸®±â /// ŸÀÌ¸Ó unsigned long mTimeOut; /// ¾Ö´Ï¸ÞÀÌ¼Ç °»½Å ½Ã°£ unsigned long mAccumTime; unsigned long mLastAccumTime; sAniParam() { ::memset( this, 0, sizeof(sAniParam) ); } ~sAniParam(){} }; /// ¾ÆÀÌÄÜ class cIcon : public cBaseIcon { public: cIcon( eUINodeType type = eUINODE_ICON ); virtual ~cIcon(); /// µå·¡±×ÁßÀÌ¸é °ÔÀÌÁö ¾Èº¸ÀÓ void ShowGauge( bool show ); void ChangeGauge( cUIRoundGauge& gauge ); void UpdateGauge( unsigned long startTime, unsigned long elapsedTime, unsigned long maintainTime, bool active ); cUIRoundGauge& GetGauge() { return mGauge; } /// bool IsActive(); void StartDelay( unsigned long delayTime ); void StopDelay(); void SetElapsedTime( unsigned long delta ); /// ¹øÈ£ unsigned int GetNumber() { return mNumber; } void SetNumber( unsigned int num ); void ClearNumber(); /// °¹¼ö º¸±â ¿©ºÎ void ShowNumber( bool show ); bool IsShowNumber() const; void SetTipType( unsigned int type ); unsigned int GetTipType() { return mTipType; } /// ¾ÆÀÌÄÜ¿¡ ¾Ö´Ï¸ÞÀÌ¼Ç Àû¿ë ¿©ºÎ ¼¼ÆÃ void SetAniEnable( bool enable ); /// ¾Ö´Ï¸ÞÀÌ¼Ç ¼¼ÆÃ void SetAuraOn( bool set ); bool IsAuraOn(); void SetAniParam( sAniParam* param ); sAniParam* GetAniParam() { return mAniParam; } void ClearCooltime(); protected: virtual bool SetSkin( const cUINodeSkin* skin ); virtual void UpdateRect(); /// À̺¥Æ® virtual bool OnCreate( cUINodeProperty* pproperty ); virtual void OnProcess( unsigned long deltaTime, unsigned long accumTime ); virtual void OnRender( cUIFontItemKeeper* pKeeper ); /// °¢ ŸÀÌ¸Ó void OnTimer( unsigned int type ); void SetAniOn( eAniType type, short frame = 0 ); protected: /// ¿øÇü °ÔÀÌÁö cUIRoundGauge mGauge; /// À̹ÌÁö ÆùÆ® cUIImageFont* mImageFont; /// ¹øÈ£ (¾ÆÀÌÅÛ °³¼ö) unsigned int mNumber; cString mNumText; /// µå·¡±× ¿©ºÎ¿¡ µû¸¥ °ÔÀÌÁö ¼î ¿©ºÎ bool mShowGauge; /// bool mShowNumber; protected: /// ¾Ö´Ï¸ÞÀ̼ÇÀ» »ç¿ëÇÏ´Â ¾ÆÀÌÄÜÀÎÁö ¼³Á¤ bool mAniEnable; /// Ä«¿îÆ®¿ë À̹ÌÁö ( ¾Ö´Ï¸ÞÀÌ¼Ç ) cPlaneObject* mpCountImage; /// ¹Ý¦ÀÌ´Â À̹ÌÁö ( ¾Ö´Ï¸ÞÀÌ¼Ç ) cPlaneObject* mpFlashImage; /// ¿À¶ó½ºÅ³¿ë Å׵θ® À̹ÌÁö( ¾Ö´Ï¸ÞÀÌ¼Ç ) cPlaneObject* mpEdgeImage; /// ¾Ö´Ï¸ÞÀÌ¼Ç Á¤º¸ ÀúÀå sAniParam mAniParam[ eANI_MAX ]; /// ÅøÆÁ»ö»ó¿¡ µû¸¥ À̹ÌÁö º¸±â ¿©ºÎ (·¹¾îµµ °ü·Ã) cUIImage* mpTipImage; eTooltipType mTipType; /// ÆÁ Ä÷¯ ŸÀÔ }; inline void cIcon::SetNumber( unsigned int num ) { mNumber = num; mNumText.Format( "%d", num ); } inline void cIcon::ClearNumber() { mNumText.Format( "" ); } inline void cIcon::ShowNumber( bool show ) { mShowNumber = show; } inline bool cIcon::IsShowNumber() const { return mShowNumber; } inline void cIcon::SetAniEnable( bool enable ) { mAniEnable = enable; }