/* ==========================================================================
* 파    일 : DMScoreWindow.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2008-09-03
* 주의사항 :
*===========================================================================*/
#pragma once
#include "UIWindow.h"
#include "ListBox.h"

class cLabel;
class cUIImageFont;
class cDMScoreWindow : public cUIWindow
{
public:
	cDMScoreWindow();
	virtual ~cDMScoreWindow();

	void Clear();

	void SetPointTeamA( unsigned int point );
	void SetPointTeamB( unsigned int point );
	void SetDestPoint( unsigned int point );
	void SetTime( long time );
	void SetTeamImage( bool fire, bool water, bool wind, bool earth );

	void ActiveTime();
	void DeActiveTime();

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnProcess( unsigned long deltaTime, unsigned long accumTime );
	void OnRender( cUIFontItemKeeper* pKeeper );
	void OnShow();

private:
	/// 아군 포인트
	cString mTeamAPointStr;
	cString mTeamBPointStr;

	/// 제한 시간
	long mPlayTime;
	long mStartTime;
	cString mTimeStr;

	/// 폰트
	cUIImageFont* mTeamAFont;
	cUIImageFont* mTeamBFont;
	cUIImageFont* mTimeFont;

	/// 각 스킨
	cUIPos			mTimePos;
	cUIPos			mTeamAPointSkinPos;
	cUIPos			mTeamBPointSkinPos;

	/// 각 팀 이미지 표시 위치
	cUIPos			mTeamAPointPos;
	cUIPos			mTeamBPointPos;

	/// 각 세력 이미지 표시 위치
	cLabel*			mTeamAMark[3];
	cLabel*			mTeamBMark[3];

	cUINodeSkin*	mpFireSkin;
	cUINodeSkin*	mpWaterSkin;
	cUINodeSkin*	mpWindSkin;
	cUINodeSkin*	mpEarthSkin;
};


//////////////////////////////////////////////////////////////////////////
/// 랭킹
struct sMyTeamInfo;

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

	void Clear();
	void AddPlayerRankInfo( sMyTeamInfo* info, bool leader );

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnShow();
	void UpdateSkin();

protected:
	cListBox*	mpRankList;
};



//////////////////////////////////////////////////////////////////////////
/// 결과
const int MAX_ROW = 9;

struct sMyTeamInfo;
class cDMResultWindow : public cUIWindow
{
public:
	cDMResultWindow();
	virtual ~cDMResultWindow();

	void Clear();
	void InsertRank( sMyTeamInfo* data, int ranki );
	void SetReward( unsigned long money, unsigned long exp, unsigned long sxp );
	void SetRewardForce( unsigned long point, unsigned long friendly );
	void SetResult( bool win );

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* , unsigned int );
	void OnShow();
	void UpdateSkin();

private:
	/// 결과 리스트박스
	cListBox*	mpReultList;

	/// 포인트 점수 리스트박스
	cListBox*	mpPointList;

	///
	cLabel*		mpMoney;
	cLabel*		mpEXP;
	cLabel*		mpSXP;

	/// 결과
	cUINode*	mpWin;
	cUINode*	mpLose;
};

/*
// 결과용 리스트 박스
class cDMResultListBox : public cListBox
{
public:
	cDMResultListBox();
	virtual ~cDMResultListBox();

protected:
	void RenderData( cUIFontItemKeeper* pKeeper );
};
*/