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.

39 lines
899 B

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