summaryrefslogtreecommitdiff
path: root/gameui/CvarNegateCheckButton.h
diff options
context:
space:
mode:
Diffstat (limited to 'gameui/CvarNegateCheckButton.h')
-rw-r--r--gameui/CvarNegateCheckButton.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gameui/CvarNegateCheckButton.h b/gameui/CvarNegateCheckButton.h
new file mode 100644
index 0000000..9eb1d94
--- /dev/null
+++ b/gameui/CvarNegateCheckButton.h
@@ -0,0 +1,39 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CVARNEGATECHECKBUTTON_H
+#define CVARNEGATECHECKBUTTON_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/CheckButton.h>
+
+class CCvarNegateCheckButton : public vgui::CheckButton
+{
+ DECLARE_CLASS_SIMPLE( CCvarNegateCheckButton, vgui::CheckButton );
+
+public:
+ CCvarNegateCheckButton( vgui::Panel *parent, const char *panelName, const char *text,
+ char const *cvarname );
+ ~CCvarNegateCheckButton();
+
+ virtual void SetSelected( bool state );
+ virtual void Paint();
+
+ void Reset();
+ void ApplyChanges();
+ bool HasBeenModified();
+
+private:
+ MESSAGE_FUNC( OnButtonChecked, "CheckButtonChecked" );
+
+ char *m_pszCvarName;
+ bool m_bStartState;
+};
+
+#endif // CVARNEGATECHECKBUTTON_H