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.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef DIALOGCVARCHANGE_H
  8. #define DIALOGCVARCHANGE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Prompt for user to enter a password to be able to connect to the server
  15. //-----------------------------------------------------------------------------
  16. class CDialogCvarChange : public vgui::Frame
  17. {
  18. public:
  19. CDialogCvarChange(vgui::Panel *parent);
  20. ~CDialogCvarChange();
  21. // initializes the dialog and brings it to the foreground
  22. void Activate(const char *cvarName, const char *curValue, const char *type, const char *question);
  23. /* message returned:
  24. "CvarChangeValue"
  25. "player"
  26. "value"
  27. "type"
  28. */
  29. // make the input stars, ala a password entry dialog
  30. void MakePassword();
  31. // set the text in a certain label name
  32. void SetLabelText(const char *textEntryName, const char *text);
  33. private:
  34. virtual void OnCommand(const char *command);
  35. virtual void OnClose();
  36. vgui::Label *m_pInfoLabel;
  37. vgui::Label *m_pCvarLabel;
  38. vgui::TextEntry *m_pCvarEntry;
  39. vgui::Button *m_pOkayButton;
  40. bool m_bAddCvarText; // if true puts the cvar name into the dialog
  41. typedef vgui::Frame BaseClass;
  42. const char *m_cType;
  43. };
  44. #endif // DIALOGCVARCHANGE_H