/* ========================================================================== * ÆÄ ÀÏ : UnionIcon.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2009-06-05 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "BaseIcon.h" const int UNIONGAUGE_WIDTH = 117; // ¿¬ÇÕÁ¤º¸ ¾ÆÀÌÄÜ class cGauge; class cUnionIcon : public cBaseIcon { public: cUnionIcon( eUINodeType type = eUINODE_ICON ); virtual ~cUnionIcon(); /// Á¤º¸ ¼¼ÆÃ ÇÔ¼ö void SetInfo( LPCTSTR name, unsigned int maxhp, unsigned int hp, unsigned short job, unsigned char level ); /// Á¤º¸ »èÁ¦ ÇÔ¼ö void ClearInfo(); /// °ÔÀÌÁöº¯°æ Á¤º¸ void UpdateGaugeInfo( unsigned int maxhp, unsigned int hp ); inline unsigned int GetMaxHP() { return mMaxValueHP; } inline unsigned int GetHP() { return mValueHP; } inline LPCTSTR GetName() { return (LPCTSTR)mName.Cstr(); } inline unsigned short GetJob() { return mJob; } inline unsigned char GetLevel() { return mLevel; } protected: bool HandleEvent( const cUIEvent& event ); bool OnCreate( cUINodeProperty* pproperty ); void OnRender( cUIFontItemKeeper* pKeeper ); void UpdateRect(); void OnMouseHovered(const cUIPos& pos ); void OnMouseLeft( const cUIPos& pos ); private: /// Á¤º¸ ¼¼ÆÃ ¿©ºÎ bool mIsSetInfo; // À̸§ cStringT mName; //Á÷¾÷ ·¹º§ cStringT mJobAndLv; // HP °ÔÀÌÁö cUIImage* mpGauge; // °ÔÀÌÁö °ª cUIPos mGaugePos; unsigned int mHeight; unsigned int mMaxValueHP; unsigned int mValueHP; unsigned short mJob; unsigned char mLevel; // À̸§ ÁÂÇ¥ cUIPos mNamePos; };