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

/// 파티관리 윈도우
class cLabel;
class cButton;
class cPartyStateWindow;
class cPartyWindow : public cUIWindow
{
public:
	cPartyWindow();
	virtual ~cPartyWindow();

	void Clear();

	/// hero 의 타겟을 갱신할지 여부
	void ChangeTarget( cPartyStateWindow* w );

	void SetLeader( bool set );
	void SetDivideType( PARTY_DIVIDE_TYPE type );

	cUIRect GetButtonRect();

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

private:
	cLabel*		mpDivide;

	/// 파티장 이미지 
	cLabel*		mpLeader;

	/// 메뉴버튼
	cButton*			mpMenuButton;
};


/// 파티 메뉴
class cPartyMenu : public cUIWindow
{
public:
	cPartyMenu();
	virtual ~cPartyMenu();

	/// 버튼활성화 설정
	void SetEnableButton( bool set );

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* caller, unsigned int id );
	void OnMouseOtherClick( const cUIPos& pos );
	void OnHide();
	void OnNetLock( int lockTry );
	void OnNetUnLock( int lockTry );

private:
	/// 리더인지 여부에 따른 활성화
	bool		mSetEnable;

	cButton*	mpInvite;
	cButton*	mpChangeLeader;
	cButton*	mpChangeDivide;
	cButton*	mpThrowUser;
	cButton*	mpOut;
};



/// 파티 분배 메뉴
class cPartyDivideMenu : public cUIWindow
{
public:
	cPartyDivideMenu();
	virtual ~cPartyDivideMenu();

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* caller, unsigned int id );
	void OnHide();
	void OnNetLock( int lockTry );
	void OnNetUnLock( int lockTry );

private:
	// 버튼
	cButton*	mpSequence;
	cButton*	mpRandom;
	cButton*	mpDamage;
	cButton*	mpFree;
};
