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.

58 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef DIALOGSERVERPASSWORD_H
  8. #define DIALOGSERVERPASSWORD_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <VGUI_Frame.h>
  13. namespace vgui
  14. {
  15. class TextEntry;
  16. class Label;
  17. class Button;
  18. };
  19. //-----------------------------------------------------------------------------
  20. // Purpose: Prompt for user to enter a password to be able to connect to the server
  21. //-----------------------------------------------------------------------------
  22. class CDialogServerPassword : public vgui::Frame
  23. {
  24. public:
  25. CDialogServerPassword();
  26. ~CDialogServerPassword();
  27. // initializes the dialog and brings it to the foreground
  28. void Activate(const char *serverName, unsigned int serverID);
  29. /* message returned:
  30. "JoinServerWithPassword"
  31. "serverID"
  32. "password"
  33. */
  34. private:
  35. virtual void PerformLayout();
  36. virtual void OnCommand(const char *command);
  37. virtual void OnClose();
  38. vgui::Label *m_pInfoLabel;
  39. vgui::Label *m_pGameLabel;
  40. vgui::TextEntry *m_pPasswordEntry;
  41. vgui::Button *m_pConnectButton;
  42. typedef vgui::Frame BaseClass;
  43. int m_iServerID;
  44. };
  45. #endif // DIALOGSERVERPASSWORD_H