summaryrefslogtreecommitdiff
path: root/gameui/CDKeyEntryDialog.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/CDKeyEntryDialog.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gameui/CDKeyEntryDialog.h')
-rw-r--r--gameui/CDKeyEntryDialog.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/gameui/CDKeyEntryDialog.h b/gameui/CDKeyEntryDialog.h
new file mode 100644
index 0000000..1200826
--- /dev/null
+++ b/gameui/CDKeyEntryDialog.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CDKEYENTRYDIALOG_H
+#define CDKEYENTRYDIALOG_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "vgui_controls/Frame.h"
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+class CCDKeyEntryDialog : public vgui::Frame
+{
+ DECLARE_CLASS_SIMPLE( CCDKeyEntryDialog, vgui::Frame );
+
+public:
+ CCDKeyEntryDialog(vgui::Panel *parent, bool inConnect = false);
+ ~CCDKeyEntryDialog();
+
+ virtual void Activate();
+
+ static bool IsValidWeakCDKeyInRegistry();
+
+private:
+ enum { MAX_CDKEY_ERRORS = 5 };
+
+ virtual void OnCommand(const char *command);
+ virtual void OnClose();
+ virtual void OnThink();
+
+ MESSAGE_FUNC_PTR( OnTextChanged, "TextChanged", panel );
+ bool IsEnteredKeyValid();
+
+ vgui::Button *m_pOK;
+ vgui::Button *m_pQuitGame;
+ vgui::TextEntry *m_pEntry1;
+ vgui::TextEntry *m_pEntry2;
+ vgui::TextEntry *m_pEntry3;
+ vgui::TextEntry *m_pEntry4;
+ vgui::TextEntry *m_pEntry5;
+
+ vgui::DHANDLE<vgui::MessageBox> m_hErrorBox;
+
+ bool m_bEnteredValidCDKey;
+
+ bool m_bInConnect;
+ int m_iErrCount;
+};
+
+
+#endif // CDKEYENTRYDIALOG_H