//
// Tools_Message_Editing.h
//
// Created by Richard Rice - 13/05/2002
// 
// Copyright (C) 2002 Rebellion, All Rights Reserved.
//


#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef _TOOLS_MESSAGE_EDITING_H_
#define _TOOLS_MESSAGE_EDITING_H_

#include "Tools_Mode.h"
#include "Misc/list_tem.hpp"
#include "Core/Asura_String.h"
#include "Core/Asura_List.h"
#include "Interface/Asura_Dialog.h"
#include "Network/Asura_Guid.h"
#include "Entity/Asura_StaticMessage_System.h"
#include "Misc/Tools_MessageLog.h"
#include "Misc/Tools_Modal_Overlay.h"
#include "Objects/Tools_Object_System.h"
#include "Objects/Tools_PositionEdit_Object.h"



// Forward declarations
class Asura_MsgData_Lift_Goto_Node;
class Asura_ServerNode_GS2Node;
struct Asura_StaticMessage;
class Asura_StaticMessageBlock;
class Asura_TableCell_Dialog;
class Asura_Overlay;
class Asura_Vector_2;

struct Axon_Msg_GS2_Teleport_To_Node;
struct Axon_Msg_GS2_Take_Link;
struct Axon_Msg_GS2_Anim_Change;
struct Axon_Msg_GS2_Set_Link_Weight;
struct Axon_Msg_GS2_Teleport_To_Node;
struct Axon_Msg_GS2_Pathfind_To_Node;

// Typedefs
typedef void ProjectEditDestinationGuidFunction(ListSelection_Overlay& xOverlay);
typedef const char* ProjectGetNameFromGuidFunction(Asura_Guid guid);

struct MessageIDAndDescription
{
	int iID;
	const char* pszDescription;
};

struct EventIDAndDescription
{
	int m_iEventID;
	const char* m_pszDescription;
	const char* m_szHelpText;
};

struct GuidAndDescription
{
	Asura_Guid uGuid;
	const char* pszDescription;
};

//wrapper for the different types of message block that can be edited
class Tools_StaticMessageBlock
{
public :
	Tools_StaticMessageBlock();

	void Reset();

	bool IsValid() const;

	void SetMessageBlock(u_short* pusMessageBlock,enum Asura_StaticMessageSetIndex eSet);
	void SetMessageBlock(u_short usMessageBlock,enum Asura_StaticMessageSetIndex eSet);
	void SetMessageBlock(Asura_StaticMessageBlock* pxMessageBlock,bool* pbModifiedFlag);

	int GetNumberOfMessagesInBlock() const;
	Asura_StaticMessage* GetMessagePointer(int iIndex);
	void AddMessage(const Asura_StaticMessage& xMessage);
	bool DeleteMessage(int iIndex);

	Asura_StaticMessageSetIndex GetMessageSet() const {return m_eMessageSet;}

	bool IsEditedMessageBlock(u_short usBlockID);

	void SetModified();
	
private :

	bool m_bCanDeleteMessageBlock;
	u_short m_usMessageBlock;
	u_short* m_pusMessageBlock;
	Asura_StaticMessageBlock* m_pxMessageBlock;
	bool* m_pbModifiedFlag;

	enum Asura_StaticMessageSetIndex m_eMessageSet;
};


//Functions for editing/displaying the messages from Asura_StaticMessages_System

class Tools_Message_Editing
{
public :
	Tools_Message_Editing();
	virtual ~Tools_Message_Editing();

	static void StartEdit(const char* prompt,unsigned short* messageBlock,Asura_StaticMessageSetIndex eMessageSet,bool bClientMessages = false,class Tools_Object* pxMessageBlockObject = 0);
	static void StartEdit(const char* prompt,Asura_StaticMessageBlock* pxMessageBlock,bool bClientMessages,class Tools_Object* pxMessageBlockObject,bool* pbModifiedFlag);
	static void StartEdit(const char* szPrompt,unsigned short usMessageBlockID,int iMessageIndex,Asura_StaticMessageSetIndex eMessageSet,Tools_Object* pxMessageBlockObject);
	static void EndEdit();

	static void Update(){s_pxThis->UpdateMain();}
	static void Render(float& x, float& y){s_pxThis->RenderMain(x,y);}
	static void HandleKeyboard(){s_pxThis->HandleKeyboardMain();}
	//Deals with selection of messages via mouse
	static bool HandleMouseSelection(){return s_pxThis->HandleMouseSelectionMain();}

    // (MH - 18.10.2002) function to allow messages to add their required files to tools exports.
    static void AddFilesToExportList(List<Asura_String>& xNameList);

	static bool GetMessageDescription(int iMessageID,const Asura_StaticMessage* pxMessage,Asura_String& xOutputDesc);

	//get null terminated array of events for physcical objects
	static const EventIDAndDescription* GetEventList();

	//get description of event from its ID
	static const char* GetEventDescription(int iEventID) { return s_pxThis->GetEventDescriptionMain(iEventID); }
	virtual const char* GetEventDescriptionMain(int iEventID);

	//gets the tooltip text for an event
	static const char* GetEventHelpText(int iEventID) { return s_pxThis->GetEventHelpTextMain(iEventID); }
	virtual const char* GetEventHelpTextMain(int iEventID);


	//forces the overlay for editing extra message data to be rebuilt
	static void UpdateMessageOverlay();

	static bool EditTestMessage(Asura_StaticMessage* pxMessage);

	static const char* GetNameFromGuid(Asura_Guid uGuid)
	{return s_pxThis ? s_pxThis->GetNameFromGuidMain(uGuid) : NULL;}

	static void LoadSettingsFromIniFile();
	static void SaveSettingsToIniFile();

	//returns true if the specified block and index matches the currently edited message
	static bool IsEditedMessage(u_short usBlockID,int iIndex);

//	static void ListMessagesTargetingGuid(List<Asura_StaticMessage*> pxMessageList);

	static bool DoesSpecialGuidHandleThisMessage(Asura_Guid uGuid,int iMessageID)
	{return s_pxThis ? s_pxThis->GuidHandlesThisMessage(uGuid,iMessageID) : false;}

	//In most cases this returns the guid that the message is being sent to
	//If the target is a proxy trigger , then it will return the target of that proxy instead	
	//(or any entity of the correct class if there are no targets)
	static Asura_Guid GetFinalDestinationGuid(const Asura_StaticMessage* pxMessage);

	static void SetProjectEditDestinationGuidFunction(ProjectEditDestinationGuidFunction* const pfnProjectEditDestinationGuid) { s_pfnProjectEditDestinationGuid = pfnProjectEditDestinationGuid; }
	static void SetProjectGetNameFromGuidFunction(ProjectGetNameFromGuidFunction* const pfnProjectGetNameFromGuid) { s_pfnProjectGetNameFromGuid = pfnProjectGetNameFromGuid; }

	Asura_StaticMessage* GetCurrentMessage();
	void SetModified();

	Tools_StaticMessageBlock& GetMessageBlock() { return m_xMessageBlock; }

	void AddMessage(bool bSubEntity, class Tools_BaseEntity_Object* pxEntityObjectOverride = NULL);
	void InitialiseMessageData(Asura_StaticMessage* message,bool bAutoEdit);

	bool EditMessageID(struct Asura_StaticMessage* message,const char* prompt);
	bool EditMessageID(Asura_StaticMessage* message, const char* prompt, Asura_List<Asura_Guid>& xTargetItemList);

	const MessageIDAndDescription* GetAsuraMessageList() const { return m_pxAsuraMessageList; }
	const MessageIDAndDescription* GetProjectMessageList() const { return m_pxProjectMessageList; }

	virtual void AddOverlayControls(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);

	//edit the MsgID part of a message
	static bool EditDestinationGuid(Asura_Guid& uDest,const char* prompt);	

	//copy messags from current message block to paste buffer
	STATIC_VOID_FN(CopyMessages);
	STATIC_BOOL_FN(CanCopyMessages);

	//paste messags from paste buffer into current message block
	STATIC_VOID_FN(PasteMessages);
	STATIC_BOOL_FN(CanPasteMessages);

	//delete current paste buffer messages
	void ClearPasteBuffer();

	static bool IsInMessageEditingMode() { return s_bIsInEditMode; }

	const char* GetNameFromGuidMain(Asura_Guid guid);
	
	#ifdef ASURA_USE_AXON
	static void DestroyGS2LinkWeightStrings();
	#endif

	//Checks to see if the files that contain messages being sent to these objects are writable.
	//If not ,asks for confirmation that it is okay for them to be deleted anyway
	static bool CheckOkayToDeleteIncomingMessages(const List<Tools_Object*>& xObjectList);

	//Deletes any messages targeting the entity , returning the number of messages removed
	static u_int DeleteIncomingMessages(Asura_Guid uGuid);

protected :
	static void TransferModeData(int iLoadOrSave);

	virtual void UpdateMain();
	virtual void RenderMain(float& x, float& y);

	void HandleKeyboardMain();
	bool HandleMouseSelectionMain();
	
	void CreateOverlay();

	virtual bool GetMessageDescriptionMain(int messageID,const Asura_StaticMessage* pxMessage,Asura_String& xOutputDesc);

	//add the currently selected object as a target for a message
	static void AddMessage(){s_pxThis->AddMessage(false);}
	static void AddMessageSubEntity(){s_pxThis->AddMessage(true);}
	//move the camera to the target of the current message
	STATIC_VOID_FN(GotoTarget);
	//delete the currently selected messssage
	STATIC_VOID_FN(DeleteMessage);

	//Enable/disable messages
	STATIC_VOID_FN(EnableAllMessagesInBlock);
	STATIC_VOID_FN(DisableAllMessagesInBlock);


	void SelectMessage(int iMessageIndex);

	//Swaps position of two messages
	bool SwapMessages(int iIndex1,int iIndex2);

	//Sorts the messages by their delay
	void SortMessages();

	// For special cases like player or game server.
	virtual bool GuidHandlesThisMessage(Asura_Guid uGuid, int iMessageID) const;

	virtual void InitialiseMessageData(struct Asura_StaticMessage* message);

#ifdef ASURA_USE_AXON
	void AddOverlayControls_GS2SetNodeParams( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void PickGS2NodeParamsAnimSet( int iUserData );
	static void PickGS2NodeParamsExitCondition( int iUserData );

	void AddOverlayControls_GS2DontStopAtNode( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void SelectGS2Node( int iUserData );

	void AddOverlayControls_GS2TakeLink( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void SelectGS2TakeLinkGuid();
	static void SetGS2TakeLinkGuid( Asura_Guid uGuid );
	static void ResetGS2TakeLinkGuid();

	void AddOverlayControls_GS2SetLinkWeight( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void CreateGS2LinkWeightStrings( const Asura_ServerNode_GS2Node* pxGameGS2Node );
	static Asura_TableCell_Dialog* CreateWeightTableCell( class Asura_Table_Dialog& xTableDialog,
														  const Asura_Vector_2& xOffset, const Asura_Vector_2& xMinCellSize,
														  const u_int uRow, const u_int uColumn, void* const pxUserData );
	void AddOverlayControls_GS2AnimChange( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void PickAnimChangeAnimSet();

	void AddOverlayControls_GS2TeleportToNode( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void SelectGS2TeleportToNodeGuid();

	void AddOverlayControls_GS2PathfindToNode( Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset );
	static void SelectGS2PathfindToNodeGuid();
	static void SetGS2PathfindToNodeGuid( Asura_Guid uGuid );
	static void ResetGS2PathfindToNodeGuid();
#endif // ASURA_USE_AXON

	static void SelectLiftGotoNodeGuid( int uGuid );
	void AddOverlayControls_LiftGotoNode(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	void AddOverlayControls_SplitterOutput(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
    void AddOverlayControls_ChangeAnim(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	void AddOverlayControls_GlassSmash(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	void AddOverlayControls_LiftCall(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	void AddOverlayControls_CutsceneTime(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
    static void ChooseAnimation_Dialog(int iData);
    void AddOverlayControls_SetDestructible(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay,  Asura_Vector_2& xOffset);
#ifndef ASURA_USE_AUDIO_SYSTEM
	void AddOverlayControls_SetReverb(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay,  Asura_Vector_2& xOffset);
#endif
	void AddOverlayControls_PlayPFXOnEntity(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
#ifdef ASURA_USE_CONTAINER_SYSTEM
	void AddOverlayControls_Container_ChangeState(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
	void AddOverlayControls_Container_ChangeStateExtended(Asura_StaticMessage* pxMessage, Asura_Overlay* pxOverlay, Asura_Vector_2& xOffset);
#endif
	
	// Projects will need to override this function if they wish the "Play PFX on Entity" message to play
	// PFX on marker points on attachments. The project dialog needs to add any extra markers to the list.
	virtual Asura_Dialog* CreateSkinMarkerPointDialog_PlayPFXOnEntity(Asura_Vector_2& xOffset, Asura_Guid uEntity, Asura_Hash_ID* puMarkerHash, const char* szName);

	void BuildEventList();
	virtual const EventIDAndDescription* GetProjectEventList(){return 0;}

	// virtual function for messages sent to something other than a tools object (special guids) to allow exporting of extra data.
	virtual void AddFilesToExportListFromMessage(const Asura_StaticMessage* pxStaticMessage, List<Asura_String>& xNameList) const;
	// static to call into the virtual function from AddFilesToExportList
	static void _AddFilesToExportListFromMessage(const Asura_StaticMessage* pxStaticMessage, List<Asura_String>& xNameList) { s_pxThis->AddFilesToExportListFromMessage(pxStaticMessage, xNameList); }

	static void RefreshMessageOverlay()	{ s_pxThis->m_bRequestRefreshMessageOverlay = true; }

    // data
	Tools_StaticMessageBlock m_xMessageBlock;

	Asura_String m_xPrompt;
	int m_iCurrentMessageIndex;
	int m_iTopMessageIndex;//index of top message shown

	bool m_bClientMessages;//editing messages to be sent on client machine

	//file that message block belongs to if in a secondary entity file
	Asura_String m_xMessageBlockEntityFile;

	MessageIDAndDescription* m_pxAsuraMessageList;//Array of common asura messages
	MessageIDAndDescription* m_pxProjectMessageList;//Array of project specific messages , to be set by derived classes

	EventIDAndDescription* m_pxEventList;//Array of events for physical objects

	static class Tools_MessageEdit_Overlay* s_pxTestMessageOverlay;

	static Asura_MsgData_Lift_Goto_Node* s_pxLiftGotoNodeMessage;

#ifdef ASURA_USE_AXON
	static Axon_Msg_GS2_Take_Link*					 s_pxTakeLinkMessage;
	static u_int									 s_uNumGS2LinkWeightStrings;
	static char**									 s_ppszGS2LinkWeightStrings;
	static class Asura_Table_Dialog*				 s_pxGS2LinkWeightTable;
	static Axon_Msg_GS2_Set_Link_Weight*			 s_pxGS2SetLinkWeightMsg;
	static Axon_Msg_GS2_Anim_Change*				 s_pxGS2AnimChangeMessage;
	static Axon_Msg_GS2_Teleport_To_Node*			 s_pxGS2TeleportToNodeMessage;
	static Axon_Msg_GS2_Pathfind_To_Node*			 s_pxGS2PathfindToNodeMessage;
#endif

	friend class Tools_MessageEdit_Overlay;
	
	//for copy/paste
	int m_iNumPasteBufferMessages;
	Asura_StaticMessage* m_pxPasteBufferMessages;

	float m_fFirstMessagePrintX;
	float m_fFirstMessagePrintY;

	static ProjectEditDestinationGuidFunction* s_pfnProjectEditDestinationGuid;
	static ProjectGetNameFromGuidFunction* s_pfnProjectGetNameFromGuid;

	//backup copy of the edited message ,for detecting when it gets changed
	static Asura_StaticMessage s_xMessageBackup;

private:
	bool m_bRequestRefreshMessageOverlay;

	static bool s_bIsInEditMode;

	static bool s_bOnSplitterOutputIndexChanged;
	static Asura_StringDisplay_Dialog* s_pxSplitterOutputDescDialog;
	static Asura_StaticMessage* s_pxSplitterBlockMessage;

	static void GetMarkerNameStringAndHash(int idata);

public :	
	static Tools_Message_Editing* s_pxThis;	
};

class Tools_MessageEdit_Overlay : public Tools_Modal_Overlay
{
public :
	Tools_MessageEdit_Overlay(Asura_StaticMessage* pxMessage);
	virtual bool DoModal();

protected :
	virtual void InitialiseOverlay(class Asura_Overlay* pxOverlay);

private :
	static void YesSelected(){s_bReturnValue = true;}
	static void NoSelected(){s_bReturnValue = false;}

	Asura_StaticMessage* m_pxMessage;
	static bool s_bReturnValue;


};

//overlay for selecting the messages in a message block that should be copied
class Tools_MessageCopy_Overlay : public Tools_Modal_Overlay
{
public :
	Tools_MessageCopy_Overlay(Tools_StaticMessageBlock* pxMessageBlock,int iSelectedMessage);
	~Tools_MessageCopy_Overlay();
	virtual bool DoModal();


	int GetNumSelected();
	bool IsSelected(int iIndex);


protected :
	virtual void InitialiseOverlay(class Asura_Overlay* pxOverlay);
	virtual void Update();

private :
	static bool _IsSelected(int iIndex,int iThis)
	{return ((Tools_MessageCopy_Overlay*)iThis)->IsSelected(iIndex);}

	static void _ToggleSelected(int iIndex,int iThis)
	{((Tools_MessageCopy_Overlay*)iThis)->ToggleSelected(iIndex);}

	static void _SelectAll(int iThis)
	{((Tools_MessageCopy_Overlay*)iThis)->SelectAll();}


	void ToggleSelected(int iIndex);
	void SelectAll();


	static void OkayPressed(int iThis)
	{((Tools_MessageCopy_Overlay*)iThis)->m_bReturnValue = true;}

	static void CancelPressed(int iThis)
	{((Tools_MessageCopy_Overlay*)iThis)->m_bReturnValue = false;}

	bool m_bReturnValue;

	Tools_StaticMessageBlock* m_pxMessageBlock;
	int m_iSelectionIndex;
	int m_iNumMessages;
	bool* m_pbToBeCopied;



	char** m_ppszMessageStrings;
};



//enumeration of places to check for static messages
enum Tools_StaticMessageLocation
{
	TOOLS_STATICMESSAGELOCATION_STATICMESSAGE, //the static message system
	TOOLS_STATICMESSAGELOCATION_DIALOGUE,//dialogue events
	TOOLS_STATICMESSAGELOCATION_END,
};

class Tools_StaticMessageID
{
public :
	void SetMessage_StaticMessageSystem(u_short usBlockID, int iMessageIndex);
	void SetMessage_Dialogue(Asura_Hash_ID uDialogue, Asura_Hash_ID uBlockHash, int iMessageIndex);

	void Invalidate(){m_iLocation = TOOLS_STATICMESSAGELOCATION_END;}

	void GetSenderInfo(Asura_Guid* puGuid, Asura_String* pxName, Asura_String* pxEventDesc) const;

	Asura_StaticMessage* GetMessagePointer();

	u_short GetStaticMessageBlockID() const;//gets ID of block from static message system (if appropriate)
	Asura_Hash_ID GetDialogueEvent() const { Asura_Assert(m_iLocation==TOOLS_STATICMESSAGELOCATION_DIALOGUE, "") ;return m_uDialogueEvent;}
	Asura_StaticMessageBlock* GetStaticMessageBlockPointer() const;//gets pointer to a Asura_StaticMessageBlock (dialogue messages)

	//Gets the location from the Tools_StaticMessageLocation enumeration above
	int GetLocation() const {return m_iLocation;}

	int GetMessageIndex() const {return m_iMessageIndex;}

	//sets the file containing the message as modified
	void SetModified() const;

	//checks to see whether the containing file can be saved
	bool CanSaveFile() const;
private :
	int m_iLocation;//(static message system or dialogue at the moment)

	union
	{
		u_int m_uStaticMessageBlockID;// message block id if in the static message system
		Asura_Hash_ID m_uDialogueEvent;//id if dialogue event if a dialogue message
	};

	Asura_Hash_ID m_uBlockHash;//hash id of message block (for dialogue)

	int m_iMessageIndex;//index of message within block
};


//Class for iterating over all the messages in the static message system
class Tools_StaticMessageIterator
{
public :
	//If bAllSystems is false then only messages within the static message system will be checked
	Tools_StaticMessageIterator(bool bAllSystems = false);

	//get the current message
	Asura_StaticMessage* GetCurrent() const;
	//get the current message block ID (combination of message set and block index)
	//only useable for messages within the static message system
	u_short GetCurrentMessageBlockID() const;

	bool IsCurrentInStaticMessageSystem() const {return m_iLocation == TOOLS_STATICMESSAGELOCATION_STATICMESSAGE;}

	void GetCurrentMessageID(Tools_StaticMessageID& xOutputID) const;
	//and index within the block
	int GetCurrentMessageIndex() const {return m_iMessageIndex;}
	//move to next message
	void Next();
	//returns true if iteration has finished
	bool Done() const;
	//restarts iteration
	void Restart();

	//Deletes the current message
	//Because of issues with removing message blocks completely in this way , this only
	//works for blocks that contain at least 2 messages. The function will return false
	//if the message can't be deleted
	//If deleted the iterator is moved back so that the subsequent call to Next() will get
	//the next message after the deleted one
	bool DeleteCurrent();

	//Sets the file that contains the current message as modified
	void SetModified() const;

	//checks to see if the file containing the current message can be saved
	bool CanSaveFile() const;
private :
	bool NextMessage_StaticMessageSystem();
	bool NextMessage_Dialogue();


	bool m_bAllSystems;
	int m_iLocation;

	int m_iMessageSet;
	int m_iBlockIndex;
	int m_iMessageIndex;

	int m_iDialogueIndex;
};

// Overlay for marker point selection for an entity with a skin.
class Tools_SkinMarkerPoint_HashDropDownList_Dialog : public Asura_Hash_DropDownList_Dialog
{
public:
	Tools_SkinMarkerPoint_HashDropDownList_Dialog(Asura_Vector_2& xOffset, Asura_Guid uEntity,
												  Asura_Hash_ID* puMarkerHash, const char* szName);

	// Get the number of hash values (not including ASURA_HASH_ID_UNSET)
	virtual u_int GetNumberOfHashValues() const;

	// Get the name for the iIndex'th hash value
	virtual const char* GetNameByIndex(int iIndex) const;

protected:
	const class Asura_Hierarchy_Skin* m_pxSkin;
};



//Message log action for going to the thing that owns a static message
class Tools_MessageLogAction_StaticMessage : public Tools_MessageLogAction
{
public :
	Tools_MessageLogAction_StaticMessage(const Tools_StaticMessageID& xMessageID) {m_xMessageID = xMessageID;}
	virtual void Execute();

private :
	void Execute_StaticMessageSystem();
	#ifdef ASURA_USE_DIALOGUE_SYSTEM
	void Execute_Dialogue();
	#endif

	Tools_StaticMessageID m_xMessageID;
};



class Tools_ChooseMoveObject : public Tools_ChooseObject
{
public :

	Tools_ChooseMoveObject( Tools_PositionEdit_Object* pxObject, Tools_Object* pxPreviousObject );
	~Tools_ChooseMoveObject();

	virtual void OnStart();
	virtual bool CanBeSelected(Tools_Object* pxObject);
	virtual void ObjectSelected(Tools_Object* pxObject) {}
	virtual void OnFinish();
	virtual bool SupportMultipleSelection() {return false;} 
	virtual void HandleKeyboard();

protected:
	Tools_PositionEdit_Object*  m_pxPositionEditObject;
	Tools_Object*				m_pxPreviousObject;
	bool						m_bBlockFunctionCall_OnFinish;

};


#endif //_TOOLS_MESSAGE_EDITING_H_











