diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/cl_demoeditorpanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/cl_demoeditorpanel.h')
| -rw-r--r-- | engine/cl_demoeditorpanel.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/engine/cl_demoeditorpanel.h b/engine/cl_demoeditorpanel.h new file mode 100644 index 0000000..af670b9 --- /dev/null +++ b/engine/cl_demoeditorpanel.h @@ -0,0 +1,79 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef CL_DEMOEDITORPANEL_H +#define CL_DEMOEDITORPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Frame.h> + +namespace vgui +{ +class Button; +class Label; +class ListPanel; +}; + +class CBaseDemoAction; +class CNewActionButton; +class CBaseActionEditDialog; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CDemoEditorPanel : public vgui::Frame +{ + DECLARE_CLASS_SIMPLE( CDemoEditorPanel, vgui::Frame ); + +public: + CDemoEditorPanel( vgui::Panel *parent ); + ~CDemoEditorPanel(); + + virtual void OnTick(); + + // Command issued + virtual void OnCommand(const char *command); + + void OnVDMChanged( void ); + + void OnRefresh(); + +protected: + + bool IsNewActionCommand( char const *command ); + + void CreateNewAction( char const *actiontype ); + + void OnEdit(); + void OnDelete(); + void OnSave(); + void OnRevert(); + + void PurgeActionList(); + void PopulateActionList(); + + CBaseDemoAction *FindActionByName( char const *name ); + + vgui::Label *m_pCurrentDemo; + vgui::Button *m_pSave; + vgui::Button *m_pRevert; + vgui::Button *m_pOK; + vgui::Button *m_pCancel; + + CNewActionButton *m_pNew; + vgui::Button *m_pEdit; + vgui::Button *m_pDelete; + + vgui::ListPanel *m_pActions; + + vgui::DHANDLE< CBaseActionEditDialog > m_hCurrentEditor; + +}; + +#endif // CL_DEMOEDITORPANEL_H |