Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CL_DEMOEDITORPANEL_H
  8. #define CL_DEMOEDITORPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. namespace vgui
  14. {
  15. class Button;
  16. class Label;
  17. class ListPanel;
  18. };
  19. class CBaseDemoAction;
  20. class CNewActionButton;
  21. class CBaseActionEditDialog;
  22. //-----------------------------------------------------------------------------
  23. // Purpose:
  24. //-----------------------------------------------------------------------------
  25. class CDemoEditorPanel : public vgui::Frame
  26. {
  27. DECLARE_CLASS_SIMPLE( CDemoEditorPanel, vgui::Frame );
  28. public:
  29. CDemoEditorPanel( vgui::Panel *parent );
  30. ~CDemoEditorPanel();
  31. virtual void OnTick();
  32. // Command issued
  33. virtual void OnCommand(const char *command);
  34. void OnVDMChanged( void );
  35. void OnRefresh();
  36. protected:
  37. bool IsNewActionCommand( char const *command );
  38. void CreateNewAction( char const *actiontype );
  39. void OnEdit();
  40. void OnDelete();
  41. void OnSave();
  42. void OnRevert();
  43. void PurgeActionList();
  44. void PopulateActionList();
  45. CBaseDemoAction *FindActionByName( char const *name );
  46. vgui::Label *m_pCurrentDemo;
  47. vgui::Button *m_pSave;
  48. vgui::Button *m_pRevert;
  49. vgui::Button *m_pOK;
  50. vgui::Button *m_pCancel;
  51. CNewActionButton *m_pNew;
  52. vgui::Button *m_pEdit;
  53. vgui::Button *m_pDelete;
  54. vgui::ListPanel *m_pActions;
  55. vgui::DHANDLE< CBaseActionEditDialog > m_hCurrentEditor;
  56. };
  57. #endif // CL_DEMOEDITORPANEL_H