//
// Tools_PFX_Dialog.h
//
// Created by Richard Rice - 01/04/2005
// 
// Copyright (C) 2005 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __TOOLS_PFX_DIALOG_H__
#define __TOOLS_PFX_DIALOG_H__

#include "Interface/Asura_Dialog.h"
#include "Interface/Asura_Gadget.h"


//specialised UI for choosing a pfx template
class Tools_PFXSelect_Dialog : public Asura_Dialog
{
public :
	enum Mode {
		MODE_EFFECTS=0,
		MODE_SOURCES=1,
		MODE_PARTICLES=2,
	};
	Tools_PFXSelect_Dialog( Mode eMode, Asura_Vector_2& xOffset, Asura_Hash_ID* puTemplate, bool* pbChangedFlag = 0);

	// Helpers to make it more obvious how to use this class.
	const char* GetTemplateName() {return m_xTemplateName.GetString();}
	Asura_Hash_ID GetTemplateHash() { return m_uHash; }

	void SetTemplateHash(Asura_Hash_ID uHash);
	void SetFilter(const char*pFilter);

	void UpdateLabel(const char* text);

	void UpdateMax();

	virtual void Render( const Asura_Vector_2& xOrigin );

protected:
	void Clicked();

	bool*					m_pbChangedFlag;
	Asura_Hash_ID*			m_puTemplate;
	Asura_Hash_ID			m_uHash;
	Asura_String			m_xTemplateName;
	Asura_String			m_xFilter;
	Asura_Function_Gadget*  m_pFuncGadget;
	Mode					m_eMode;
};


#endif //__TOOLS_PFX_DIALOG_H__
