/* ==========================================================================
* 파    일 : TargetWindow.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2006-11-28
* 주의사항 :
*===========================================================================*/
#pragma once
#include "UIWindow.h"

class cLabel;
class cGauge;
class cEffectSceneNode;
class cBaseObject;
class cTargetBuff;
class cUIImage;

class cTargetWindow : public cUIWindow
{
public:
	cTargetWindow();
	virtual ~cTargetWindow();

	void UIStageIn();
	void UpdateWindow();
	void ClearBuff();
	
	/// 게이지 차는 속도 조절
	void SetHPGaugeSpeed( float s );

	/// 타겟 버프 아이콘 세팅
	void AddBuff( unsigned long uniqueIdx, unsigned long influenceIdx );
	void DelBuff( unsigned long uniqueIdx );
	void DelDeBuff( unsigned long uniqueIdx );

	/// 윈도우 사이즈 조정
	void UpdateSize();

protected:
	/// 처리
	virtual bool OnCreate( cUINodeProperty* pproperty );
	virtual void OnProcess( unsigned long deltaTime, unsigned long accumTime );
	virtual void OnRender(cUIFontItemKeeper* pKeeper );
	virtual void OnRButtonUp( const cUIPos& pos );
	virtual void OnShow();
	virtual void OnHide();
	virtual void UpdateRect();
	virtual void UpdateSkin();

	/// 타겟 정보 세팅 
	void SetTargetInfo( char level, LPCTSTR name );
	void SetTargetEffect( cBaseObject* pObj );

protected:
	/// 타겟 이름
	cLabel* mpTargetNameLabel;

	/// 타겟 레벨
	cLabel* mpTargetLevelLabel;

	/// 타겟 hp 게이지 틀
	cGauge*	 mpHPGauge;

	bool		mShowHPImage;

	/// 타겟 이펙트
	unsigned long		mTargetEffectIdx;
	cEffectSceneNode*	mpTargetEffect;

	/// 타겟 버프
	cUINodeSkin*	mpNodeSkin;
	cUIImage*		mpBack;
	cTargetBuff*	mpTargetBuff;
	cUIRect			mpBuffRc;
};


////////////////////////////////////////////////////
/// 타겟 버프
#include "PartyBuff.h"
#include "UITransformImage.h"

/// 파티원 버프 윈도우
class cTargetBuff : public cPartyBuff
{
public:
	cTargetBuff();
	virtual ~cTargetBuff();

protected:
	bool SetSkin(const cUINodeSkin* pskin );
	void UpdateSkin();
	void UpdateRect();
	void UpdateWindowSize();
};
