//
// Tools_PickSoundEvent_Dialog.h
//
// Created by Richard Rice - 04/07/2006
// 
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __TOOLS_PICKSOUNDEVENT_DIALOG__
#define __TOOLS_PICKSOUNDEVENT_DIALOG__


#include "Interface/Asura_Dialog.h"


//Dialog control for picking a sound event. When clicked it will open the sound event selection overlay.
class Tools_PickSoundEvent_Dialog : public Asura_Function_Dialog
{
public :
	//szPrefix is a prefix added before the sound event name on the dialog
	//puEventHash is a pointer to the hash ID being edited
	//pbModified is an optional flag that will be set to true whenever the hash value is modified.
	Tools_PickSoundEvent_Dialog(const char* szPrefix,const Asura_Vector_2& xOffset,Asura_Hash_ID* puEventHash,bool* pbModified = 0);

private :
	virtual void PerFrameUpdate();

	void UpdateEventLabel();

	static void OnClicked(int iThis){((Tools_PickSoundEvent_Dialog*)iThis)->OnClicked();}
	void OnClicked();

	Asura_String m_xPrefix;
	Asura_Hash_ID* m_puEventHash;
	Asura_Hash_ID m_uEventBackup;
	bool* m_pbModified;
};

//dialog control to go along side the one above. This one just provides a convenient way of going to the edit
//event screen for the selected event
class Tools_EditSoundEvent_Dialog : public Asura_Function_Dialog
{
public	:
	Tools_EditSoundEvent_Dialog(const char* szName,const Asura_Vector_2& xOffset,Asura_Hash_ID* puEventHash);
private :
	virtual void PerFrameUpdate();

	static void OnClicked(int iThis){((Tools_EditSoundEvent_Dialog*)iThis)->OnClicked();}
	void OnClicked();

	Asura_Hash_ID* m_puEventHash;
};

#endif //__TOOLS_PICKSOUNDEVENT_DIALOG__
