summaryrefslogtreecommitdiff
path: root/gameui/CvarTextEntry.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /gameui/CvarTextEntry.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gameui/CvarTextEntry.h')
-rw-r--r--gameui/CvarTextEntry.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/gameui/CvarTextEntry.h b/gameui/CvarTextEntry.h
new file mode 100644
index 0000000..8e3ad14
--- /dev/null
+++ b/gameui/CvarTextEntry.h
@@ -0,0 +1,35 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CVARTEXTENTRY_H
+#define CVARTEXTENTRY_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/TextEntry.h>
+
+class CCvarTextEntry : public vgui::TextEntry
+{
+ DECLARE_CLASS_SIMPLE( CCvarTextEntry, vgui::TextEntry );
+
+public:
+ CCvarTextEntry( vgui::Panel *parent, const char *panelName, char const *cvarname );
+ ~CCvarTextEntry();
+
+ MESSAGE_FUNC( OnTextChanged, "TextChanged" );
+ void ApplyChanges( bool immediate = false );
+ virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
+ void Reset();
+ bool HasBeenModified();
+
+private:
+ char *m_pszCvarName;
+ char m_pszStartValue[64];
+};
+
+#endif // CVARTEXTENTRY_H