/* ==========================================================================
* 파    일 : SkillTipWindow.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2007-09-06
* 주의사항 :
*===========================================================================*/
#pragma once
#include "TipWindow.h"

const int MAX_RIGHT_TIP = 20;

struct sPlayerSkillBaseInfo;
struct sPlayerSkillStepInfo;

/// 아이템용 팁 윈도우
class cSkillTipWindow : public cTipWindow
{
public:
	cSkillTipWindow();
	virtual ~cSkillTipWindow();

	///
	bool SetSkill( eTip_Kind tipkind, const cUIPos& pos, unsigned long skillIndex, char skillStep, bool store );

protected:
	void OnRender( cUIFontItemKeeper* fontKeeper );
	void Clear();
	void OnTimer();
	void OnHide();

	void CalcRightMaxWidth( const cStringT& str );

	////
	bool SetNormalTip( unsigned long skillIdx, char skillStep, bool store = true );
	bool SetQuickTip( unsigned long skillIdx, char skillStep );

	///
	void SetName( sPlayerSkillBaseInfo* pInfo, unsigned long color );
	void SetShotType( sPlayerSkillBaseInfo* pInfo, unsigned long color );
	void SetEquip( sPlayerSkillBaseInfo* pInfo, unsigned long color );
	void SetCastingTime( sPlayerSkillBaseInfo* pInfo, sPlayerSkillStepInfo* pStepInfo, unsigned long color );
	void SetCoolTime( sPlayerSkillStepInfo* pStepInfo, unsigned long color, unsigned long skillIdx );
	void SetUsedValue( sPlayerSkillBaseInfo* pInfo, sPlayerSkillStepInfo* pStepInfo, unsigned long color );
	void SetInfluence( unsigned long influenceIdx );

	/// 
	void SetRightAttribute( sPlayerSkillBaseInfo* pInfo, unsigned long color ); 
	void SetRightStepInfo( sPlayerSkillBaseInfo* pInfo, unsigned int curStep, unsigned long color ); 
	void SetRightTargetDist( sPlayerSkillBaseInfo* pInfo, sPlayerSkillStepInfo* pStepInfo, unsigned long color, unsigned long skillIdx ); 
	void SetRightBound( sPlayerSkillStepInfo* pStepInfo, unsigned long color ); 

	void AddRightGap( unsigned int count );

private:
	/// 오른쪽 정렬로 붙어있는 추가 팁 
	cTipParam	mRightTip[MAX_RIGHT_TIP];

	unsigned int mRightMaxWidth;
	unsigned int mRightIndex;

	/// 상점 처럼 나누어서 찍는 루틴을 표현하기 위한 플래그
	unsigned int mBottomIndex;
	unsigned int mBottomRightIndex;

	cTipParam		mRequireValue[MAX_RIGHT_TIP][4];
	unsigned int	mRequireIndex;

	/// 재사용시간, 사용대기시간 변경시 저장용
	unsigned int mTimeTipIdx;
	cStringT	mSaveCoolTime;
	unsigned long mSaveSkillIndex;
};
