//------------------------------------------------------------------------------
// File   : ToolsAVP_Entity_SpawnPoint.h
// Author : Gareth Thomas
// Date   : 22 / 10 / 07
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//------------------------------------------------------------------------------

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE
#ifndef __TOOLSAVP_ENTITY_SPAWNPOINT_H__
#define __TOOLSAVP_ENTITY_SPAWNPOINT_H__

//------------------------------------------------------------------------------
// Include files...
//------------------------------------------------------------------------------
#include "Interface/Asura_Dialog.h"
#include "Entity/Tools_Entity_StartPoint.h"
#include "Entity/Tools_Entity_Object.h"
#include "Objects/Tools_Object_System.h"

#include "Objects/ToolsAVP_Object_Type.h"

//------------------------------------------------------------------------------
// Class declarations
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Class        : ToolsAVP_Entity_SpawnPoint
// Author       : Gareth Thomas
// Date         : 22 / 10 / 07
// Description  : Class to handle Tools editing of Spawn Points.
//------------------------------------------------------------------------------
class ToolsAVP_Entity_SpawnPoint : public Tools_Entity_Object
{

public:

	// Public Construction / Deconstruction functions...
	ToolsAVP_Entity_SpawnPoint							(Asura_Entity* pxEntity);
	virtual ~ToolsAVP_Entity_SpawnPoint					(void);

	// Public Static functions
	static void				Project_Create				(void);
	static void				Create						(void);
	static Tools_Object*	Create						(Asura_Entity* pxEntity);
	static void				SetSelectedSpawner			(ToolsAVP_Entity_SpawnPoint* pxSpawnPoint);
	static void				ClearSelectedSpawner		(void);

	// Public overridden Virtual functions...
	virtual void			OnSelection					(void);
	virtual void			OnDeselection				(void);
	virtual void			UpdateWhileSelected			(void);
	virtual void			Render						(void);
	virtual void			Update						(void);
	virtual const char*		GetTypeDescription			(void)				{return("Spawn Point");}
	virtual void			UpdatePositionInAsuraData	(bool bUpdateLinkedObjects);
	virtual void			AddOverlayControls			(Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	virtual bool			CanBeCopied					(void) const { return Type == TOT_Entity_SpawnPoint; }

protected:

	void					SetUseGameSceneIn			(bool bVal)		{m_bUseGameSceneIn = bVal;}

	// Protected variables
	Asura_Guid							m_uGameSceneOut;	// The Guid of the gamescene node an actor entity will use upon spawning at this spawn point.
	Asura_Guid							m_uGameSceneIn;		// The Guid of the gamescene node an actor entity will use when trying to get back into the spawn point.
// 	Asura_Hash_ID						m_uSpawnBlueprintTypeHashID;
// 	Asura_Hash_ID						m_uSpawnBlueprintHashID;

	bool								m_bUseGameSceneIn;

private:

	// Private typedefs...
	typedef Tools_Entity_Object PARENT;		 

	// Private Static variables...
	static ToolsAVP_Entity_SpawnPoint*	s_pxSpawnPoint;
	static Asura_Dialog*				s_pxGameSceneOutNameDialog;
	static Asura_Dialog*				s_pxGameSceneInNameDialog;

	static Asura_Guid					s_uOldGameSceneOutGuid;
	static Asura_Guid					s_uOldGameSceneInGuid;

	// Substitute text for gamescene names (e.g. when no gamescene node is selected)
	static const char*					s_pszUnset;
	static const char*					s_pszNotFound;

	// Private functions and operators...
	ToolsAVP_Entity_SpawnPoint							(void);
	ToolsAVP_Entity_SpawnPoint							(const ToolsAVP_Entity_SpawnPoint& xOther);
	ToolsAVP_Entity_SpawnPoint&	operator=				(const ToolsAVP_Entity_SpawnPoint& xOther);

	static void SelectGamesceneOut						(void);
	static void	ClearGamesceneOut						(void);
	static void SelectGamesceneIn						(void);
	static void ClearGamesceneIn						(void);

	static void UpdateGameSceneName						(Asura_Dialog* pxDialog, Asura_Guid uGameSceneGuid);

// 	static void ChooseBlueprint							(void);
// 
// 	Asura_String GetBlueprintString();

};   /// End of class 'ToolsAVP_Entity_SpawnPoint'.

#endif   // ifndef __TOOLSAVP_ENTITY_SPAWNPOINT_H__
/// End of file 'ToolsAVP_Entity_SpawnPoint'.