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.

45 lines
1.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef VAREDITDIALOG_H
  8. #define VAREDITDIALOG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Handles editing of cvars
  15. //-----------------------------------------------------------------------------
  16. class CVarEditDialog : public vgui::Frame
  17. {
  18. public:
  19. CVarEditDialog(vgui::Panel *parent, const char *name);
  20. ~CVarEditDialog();
  21. void Activate(vgui::Panel *actionSignalTarget, KeyValues *rules);
  22. protected:
  23. virtual void OnCommand(const char *command);
  24. virtual void OnClose();
  25. void ApplyChanges();
  26. private:
  27. vgui::Button *m_pOKButton;
  28. vgui::Button *m_pCancelButton;
  29. vgui::TextEntry *m_pStringEdit;
  30. vgui::ComboBox *m_pComboEdit;
  31. KeyValues *m_pRules;
  32. typedef vgui::Frame BaseClass;
  33. };
  34. #endif // VAREDITDIALOG_H