#pragma once

#include <map>
#include "../interface.h"
#include "../RoleData/RoleData.h"

using namespace std;

class CCharacterSelect;
extern CCharacterSelect*		g_pCharacterSelect;

class CCharacterSelect : public CInterfaceBase
{
public:
	CCharacterSelect(CInterface* object);
	virtual ~CCharacterSelect();

	virtual	void				RegisterFunc();	

	virtual	int					GetSize()							{ return (int)m_charInfo.size(); }
	virtual	void				Insert(int index, SampleRoleData* pRoleData);
	virtual	void				Delete(int index);
	virtual	SampleRoleData*		GetCharInfo(int serial);
	virtual	int					GetCharIndex(int serial);
	virtual	void				Clear();	
	virtual	void				SetSelected(int item);
	virtual	int					GetSelected()							{ return m_selected+1; }	
	virtual	void				SendCharacterListUpdate();
protected:
	map<int, SampleRoleData>	m_charInfo;				// 角色資料
	int							m_selected;				// 目前選擇角色
};