/* ========================================================================== * ÆÄ ÀÏ : UIImage.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.09.25 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UIImageBase.h" /// UI À̹ÌÁö - È®´ë, Ãà¼Ò °¡´É class cUIImage : public cUIImageBase { public: cUIImage(); cUIImage( NiTexture* pTex ); cUIImage( NiTexture* tex, unsigned int x, unsigned int y, unsigned int tx, unsigned int ty, unsigned int tw, unsigned int th ); virtual ~cUIImage(); /// ÅØ½ºÃ³¸¦ ¼³Á¤ virtual void SetTexture( NiTexture* ptex ); /// ·»´õ¸µ virtual void Draw(); /// ½ºÅ©¸° ÁÂÇ¥ ¼ÂÆÃ void SetPos( int x, int y ); /// ½ºÅ©¸° »ó¿¡¼­ Å©±â void SetScreenWH( unsigned int screenW, unsigned int screenH ); void SetScreenRect( const cUIRect& rect ); /// °»½Å void UpdateImage(); /// ÅØ½ºÃÄ UV ¼ÂÆÃ void SetTextureRect( unsigned int tl, unsigned int tt, unsigned int tr, unsigned int tb ); void SetTextureRect( const cUIRect& rect ); /// Á¤Á¡ Ä÷¯ Á¤º¸ ¼ÂÆÃ void SetColor( float r, float g, float b, float a ); void SetColor( const NiColorA& color ); virtual void SetAlpha( float a ); /// ȸÀü ¹× À̵¿ /// Àý´ëÁÂÇ¥. void SetTranslate( int x, int y ); void SetRotate( float angle ); inline NiAlphaProperty* GetAlphaProp() { return mpAlphaProp; } inline NiTexturingProperty* GetTexturingProp() { return mpTextureProp; } int GetScreenPosX(){ return mScreenX; } int GetScreenPosY(){ return mScreenY; } cUIRect GetScreenRect(){ return cUIRect( mScreenX, mScreenY, mScreenX + mWidthOnScreen, mScreenY + mHeightOnScreen ); } virtual void SetRenderTargetWH( unsigned int width, unsigned int height ); protected: /// ½ºÅ©¸° °´Ã¼ NiMeshScreenElementsPtr mpScreenElement; /// ÅØ½ºÃÄ Á¤º¸ÀÇ º¯°æÀ» ¿ëÀÌÇÏ°Ô Çϱâ À§ÇÑ ÂüÁ¶ ¹× °ü¸® º¯¼ö NiTexturingProperty* mpTextureProp; /// ¾ËÆÄ ºí·£µùÀ» À§ÇÑ ÂüÁ¶ ¹× °ü¸® º¯¼ö NiAlphaProperty* mpAlphaProp; /// È­¸é»ó¿¡¼­ÀÇ À§Ä¡ ¹× Å©±â int mScreenX; int mScreenY; float mScaleX; float mScaleY; unsigned int mRenderTargetWidth; unsigned int mRenderTargetHeight; /// ȸÀü °¢µµ /// ȸÀü °¢µµ float mAngle; NiPoint2 mVertex[4]; NiPoint2 mCenter; };