summaryrefslogtreecommitdiff
path: root/public/dme_controls/presetpicker.h
blob: 29b3b130906b9cceb9814e090dd28afa9648c269 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Dialog used to edit properties of a particle system definition
//
//===========================================================================//

#ifndef PRESETPICKER_H
#define PRESETPICKER_H

#ifdef _WIN32
#pragma once
#endif

#include "vgui_controls/Frame.h"


//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CDmElement;

using namespace vgui;


//-----------------------------------------------------------------------------
//
// Purpose: Picker for animation set presets
//
//-----------------------------------------------------------------------------
class CPresetPickerFrame : public vgui::Frame
{
	DECLARE_CLASS_SIMPLE( CPresetPickerFrame, vgui::Frame );

public:
	CPresetPickerFrame( vgui::Panel *pParent, const char *pTitle, bool bAllowMultiSelect = true );
	~CPresetPickerFrame();

	// Shows the modal dialog
	void DoModal( CDmElement *pPresetGroup, bool bSelectAll, KeyValues *pContextKeyValues );

	// Inherited from Frame
	virtual void OnCommand( const char *pCommand );

private:
	// Refreshes the list of presets
	void RefreshPresetList( CDmElement *pPresetGroup, bool bSelectAll );
	void CleanUpMessage();

	vgui::ListPanel *m_pPresetList;
	vgui::Button *m_pOpenButton;
	vgui::Button *m_pCancelButton;
	KeyValues *m_pContextKeyValues;
};

#endif // PRESETPICKER_H