Counter Strike : Global Offensive Source Code
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.

75 lines
1.8 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CL_DEMOACTIONEDITORS_H
  8. #define CL_DEMOACTIONEDITORS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. class CDemoEditorPanel;
  14. //-----------------------------------------------------------------------------
  15. // Purpose:
  16. //-----------------------------------------------------------------------------
  17. class CBaseActionEditDialog : public vgui::Frame
  18. {
  19. DECLARE_CLASS_SIMPLE( CBaseActionEditDialog, vgui::Frame );
  20. public:
  21. CBaseActionEditDialog( CDemoEditorPanel *parent, CBaseDemoAction *action, bool newaction );
  22. virtual void Init( void );
  23. virtual void OnClose();
  24. virtual void OnCancel();
  25. virtual void OnCommand( char const *commands );
  26. // Returns true if changes were effected
  27. virtual bool OnSaveChanges( void );
  28. private:
  29. vgui::Button *m_pOK;
  30. vgui::Button *m_pCancel;
  31. vgui::TextEntry *m_pActionName;
  32. vgui::ComboBox *m_pStartType;
  33. vgui::TextEntry *m_pStart;
  34. protected:
  35. CDemoEditorPanel *m_pEditor;
  36. CBaseDemoAction *m_pAction;
  37. bool m_bNewAction;
  38. };
  39. //-----------------------------------------------------------------------------
  40. // Purpose:
  41. //-----------------------------------------------------------------------------
  42. class CBaseActionWithTargetDialog : public CBaseActionEditDialog
  43. {
  44. DECLARE_CLASS_SIMPLE( CBaseActionWithTargetDialog, CBaseActionEditDialog );
  45. public:
  46. CBaseActionWithTargetDialog( CDemoEditorPanel *parent, CBaseDemoAction *action, bool newaction );
  47. // Also a pure baseclass
  48. virtual void Init( void );
  49. // Returns true if changes were effected
  50. virtual bool OnSaveChanges( void );
  51. private:
  52. vgui::TextEntry *m_pActionTarget;
  53. };
  54. #endif // CL_DEMOACTIONEDITORS_H