/* ==========================================================================
* 파    일 : EnhancedWindow.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2008-04-16
* 주의사항 :
*===========================================================================*/
#pragma once
#include "UIWindow.h"
#include "ItemIcon.h"

/// 아이템 강화 윈도우 
class cButton;
class cGauge;
class cEnhancedWindow : public cUIWindow
{
public:
	cEnhancedWindow();
	virtual ~cEnhancedWindow();

	/// 전체 초기화
	void Clear( bool allclear );

	/// 강화 아이템 삽입
	bool AddItem( unsigned int slotIndex );

	/// 강화 카드 삽입
	bool AddCard( unsigned int slotIndex );

	/// 결과세팅
	void SetResult( bool success );

	void ShowTop(bool hideOthers = false, bool onsound = true);

	void StartGauge();
	void StopGauge();

	void HideESC(bool onsound = true);

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* pcaller, unsigned int id );
	void OnRender( cUIFontItemKeeper* pKeeper );
	void OnIconHovered(cUINode* caller, unsigned int id, const cUIPos& pos );
	void OnGaugeEnd(cUINode* , unsigned int );
	void UpdateRect();
	void OnShow();
	void OnHide();
	void OnNetLock( int lockTry );
	void OnNetUnLock( int lockTry );

	void HideResult();

private:
	/// 강화아이템 용 슬롯
	cItemIcon*	mItemSlot;

	/// 강화카드용 슬롯
	cItemIcon*	mCardSlot;

	///
	cButton*	mpStart;
	cGauge*		mpGaugeBar;

	/// 등록된 슬롯 인덱스 
	unsigned long mItemSlotIndex;
	unsigned long mCardSlotIndex;

	/// 성공/실패 이미지
	cUINode*	mpSuccess;
	cUINode*	mpFailure;
};

