//
// Tools_Dialog_FacialAnimation_PickAnimation.h
//
// Created by Richard Rice 18/11/2008
// 
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __TOOLS_FACIALANIMATION_DIALOG_PICKFACE_H__
#define __TOOLS_FACIALANIMATION_DIALOG_PICKFACE_H__
#if defined(ASURA_USE_FACIAL_ANIMATION_SYSTEM)

#include "Interface/Asura_Dialog.h"

//Dialog control for picking a facial animation. When clicked it will open an animation selection overlay.
class Tools_Dialog_FacialAnimation_PickAnimation : public Asura_Function_Dialog
{
public :
	//szPrefix is a prefix added before the animation name on the dialog
	//puAnimID 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_Dialog_FacialAnimation_PickAnimation(const char* szPrefix,const Asura_Vector_2& xOffset,Asura_Hash_ID* puAnimID,bool* pbModified = 0);

private :
	virtual void PerFrameUpdate();

	void UpdateText();

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

	Asura_String m_xPrefix;
	Asura_Hash_ID* m_puAnimID;
	Asura_Hash_ID m_uAnimIDBackup;
	bool* m_pbModified;
};

#endif // defined(ASURA_USE_FACIAL_ANIMATION_SYSTEM)
#endif // __TOOLS_FACIALANIMATION_DIALOG_PICKFACE_H__
