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.

58 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CDKEYENTRYDIALOG_H
  8. #define CDKEYENTRYDIALOG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "vgui_controls/Frame.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose:
  15. //-----------------------------------------------------------------------------
  16. class CCDKeyEntryDialog : public vgui::Frame
  17. {
  18. DECLARE_CLASS_SIMPLE( CCDKeyEntryDialog, vgui::Frame );
  19. public:
  20. CCDKeyEntryDialog(vgui::Panel *parent, bool inConnect = false);
  21. ~CCDKeyEntryDialog();
  22. virtual void Activate();
  23. static bool IsValidWeakCDKeyInRegistry();
  24. private:
  25. enum { MAX_CDKEY_ERRORS = 5 };
  26. virtual void OnCommand(const char *command);
  27. virtual void OnClose();
  28. virtual void OnThink();
  29. MESSAGE_FUNC_PTR( OnTextChanged, "TextChanged", panel );
  30. bool IsEnteredKeyValid();
  31. vgui::Button *m_pOK;
  32. vgui::Button *m_pQuitGame;
  33. vgui::TextEntry *m_pEntry1;
  34. vgui::TextEntry *m_pEntry2;
  35. vgui::TextEntry *m_pEntry3;
  36. vgui::TextEntry *m_pEntry4;
  37. vgui::TextEntry *m_pEntry5;
  38. vgui::DHANDLE<vgui::MessageBox> m_hErrorBox;
  39. bool m_bEnteredValidCDKey;
  40. bool m_bInConnect;
  41. int m_iErrCount;
  42. };
  43. #endif // CDKEYENTRYDIALOG_H