/* ==========================================================================
* 작 성 자 : 이순규
* 작 성 일 : 2007.02.12
* 내    용 : 인벤토리 윈도우
* 주의사항 : 
*===========================================================================*/
#pragma once
#include "TabWindow.h"

class cPushButton;
class cGauge;
class cItemIcon;
class cNumberEditBox;
class cUIImage;
/// 인벤토리 윈도우
class cInventoryWindow : public cTabWindow
{
public:
	cInventoryWindow();
	virtual ~cInventoryWindow();

	void UIStageIn();
	
	/// 가방 버튼
	void SetBagButtonPressed( unsigned int index, bool pressed );

	void UpdateMaxWeight();

	/// 돈
	void SetMoney( unsigned long money );
	unsigned long GetMoney();

	///
	void ChangeSelect( unsigned int slotIndex );
	void HideSelect();

protected:
	bool OnCreate( cUINodeProperty* property );
	void OnCommand( cUINode* node, unsigned int id );
	void OnRender(cUIFontItemKeeper* pKeeper );
	void OnPushButtonPressed( cUINode* caller, unsigned int id );
	void OnIconClicked( cUINode* caller, unsigned int id );
	void OnIconRightClicked( cUINode* caller, unsigned int id, bool shift );
	void OnTabButtonPressed( cUINode* caller, unsigned int id );
	void UpdateRect();
	void OnShow();
	void OnHide();
	void HideESC( bool onsound );

	void UpdateSelect( cItemIcon* icon );

protected:
	/// 무게 게이지
	cGauge* mWeightGauge;

	/// 선택된 아이콘 표시 
	cItemIcon*  mSelectIcon;
    cUIImage*	mpSelectImage;
	bool		mShowSelect;

	/// 가방
	cPushButton* mBagButton[3];

	/// 소유금액
	cNumberEditBox* mpMoney;

	/// 가방의 show 상태 저장
	BYTE mShowBit;
};

inline void cInventoryWindow::HideSelect()
{
	mShowSelect = false;
}