#pragma once #include "KUIControl.h" #include "KPrimitiveSprite.h" /// Static Control class KUIControlStatic : public KUIControl { public: KUIControlStatic(); ~KUIControlStatic(); virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG); virtual void Render(KViewportObject * pViewport, bool isFront = false ); virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y); // 2011.09.30 : servantes : 스태틱 컨트롤에 왼,오른 클릭 메세지 받게 함수 추가 virtual void OnChangeCaptionNotify(); virtual void SetEnableOption( bool bOption ) { m_bEnableOption = bOption; } // 2011.09.30 : servantes : 플래그 설정을 바꾸어 메세지를 받는다 // 기본은 마우스 메세지를 받지 못하지만 특정 컨트롤들만 받을 수 있게끔 하기 위해서 함수 추가 void SetEnableMouseClickMessage(bool bEnable); protected: bool m_bEnableOption; }; /// Icon Control class KUIControlIconStatic : public KUIControl { public: KUIControlIconStatic(); ~KUIControlIconStatic(); enum { KICONBUTTON_NORMAL = 0, KICONBUTTON_ACTIVATE, KICONBUTTON_DOWN, KICONBUTTON_DISABLE, }; void SetIcon( const char* pSprName = NULL, const char* pAniName = NULL ); void SetIconColor( const KColor& color ); void SetAbleReSizeRes(bool bResize) { m_bReSizeRes = bResize; } virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y); virtual void OnChagneBackNotify(); // bintitle. 2010.04.29 void SetResSprite( KResSprite * pRes ); BOOL GetPRIconIsUse() { return m_prIcon.IsUse(); } //servantes 2011.02.16 protected: virtual void _initControl(); void SetButtonState( DWORD State ); protected: KSpritePrimitive m_prIcon; DWORD m_dwButtonState; bool m_bLeftButton; bool m_bReSizeRes; }; /// Rank Add Icon Control class KUIControlRankIconStatic : public KUIControlIconStatic { public: KUIControlRankIconStatic(); ~KUIControlRankIconStatic(); void SetSubIcon( int nCnt, const char* pSprName = NULL, const char* pAniName = NULL ); void SetSubIconAniName( int nIndex, const char* pAniName = NULL ); protected: virtual void _initControl(); KSpritePrimitive * m_prSubIcon; }; // Multi Layer Icon Control // Used in item equip slots. Used to display an "E" mark or a summoned creature indicator class KUIControlMultiIcon : public KUIControl { public: KUIControlMultiIcon(); ~KUIControlMultiIcon(); enum { KICONBUTTON_NORMAL = 0, KICONBUTTON_ACTIVATE, KICONBUTTON_DOWN, KICONBUTTON_DISABLE, }; void SetIconLayer(int nCount); int GetIconLayerCount() const; // sonador #2.1.2.4.3 // The higher the Layer value, the more it’s drawn on top void SetIcon( int nLayer, const char* pSprName = NULL, LPCSTR lpszAniName = NULL); struct ICON_INFO { ICON_INFO() { nFrameIndex = 0; } int nFrameIndex; std::string sSprName; std::string sAniName; }; const ICON_INFO& GetIconInfoByLayer(int nLayer) const; virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y); virtual void OnChagneBackNotify(); protected: virtual void _initControl(); void SetButtonState( DWORD State ); protected: std::vector< ICON_INFO > m_vtIconInfo; std::vector m_vtPrIcon; DWORD m_dwButtonState; bool m_bLeftButton; };