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.

41 lines
1012 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CVARTOGGLECHECKBUTTON_H
  8. #define CVARTOGGLECHECKBUTTON_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/CheckButton.h>
  13. class CCvarToggleCheckButton : public vgui::CheckButton
  14. {
  15. DECLARE_CLASS_SIMPLE( CCvarToggleCheckButton, vgui::CheckButton );
  16. public:
  17. CCvarToggleCheckButton( vgui::Panel *parent, const char *panelName, const char *text,
  18. char const *cvarname );
  19. ~CCvarToggleCheckButton();
  20. virtual void SetSelected( bool state );
  21. virtual void Paint();
  22. void Reset();
  23. void ApplyChanges();
  24. bool HasBeenModified();
  25. virtual void ApplySettings( KeyValues *inResourceData );
  26. private:
  27. MESSAGE_FUNC( OnButtonChecked, "CheckButtonChecked" );
  28. char *m_pszCvarName;
  29. bool m_bStartValue;
  30. };
  31. #endif // CVARTOGGLECHECKBUTTON_H