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.

67 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef DIALOGADDBAN_H
  8. #define DIALOGADDBAN_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. #include <vgui_controls/ComboBox.h>
  14. #include <vgui_controls/TextEntry.h>
  15. #include <vgui_controls/RadioButton.h>
  16. //-----------------------------------------------------------------------------
  17. // Purpose: Prompt for user to enter a password to be able to connect to the server
  18. //-----------------------------------------------------------------------------
  19. class CDialogAddBan : public vgui::Frame
  20. {
  21. DECLARE_CLASS_SIMPLE( CDialogAddBan, vgui::Frame );
  22. public:
  23. CDialogAddBan(vgui::Panel *parent);
  24. ~CDialogAddBan();
  25. // initializes the dialog and brings it to the foreground
  26. void Activate(const char *type,const char *player, const char *authid);
  27. /* message returned:
  28. "AddBanValue"
  29. "id"
  30. "time"
  31. "type"
  32. "ipcheck"
  33. */
  34. // make the input stars, ala a password entry dialog
  35. void MakePassword();
  36. // set the text in a certain label name
  37. void SetLabelText(const char *textEntryName, const char *text);
  38. void SetTextEntry(const char *textEntryName, const char *text);
  39. // returns if the IPCheck check button is checked
  40. bool IsIPCheck();
  41. private:
  42. virtual void PerformLayout();
  43. virtual void OnCommand(const char *command);
  44. virtual void OnClose();
  45. MESSAGE_FUNC_PTR( OnButtonToggled, "RadioButtonChecked", panel );
  46. vgui::TextEntry *m_pTimeTextEntry;
  47. vgui::TextEntry *m_pIDTextEntry;
  48. vgui::Button *m_pOkayButton;
  49. vgui::ComboBox *m_pTimeCombo;
  50. vgui::RadioButton *m_pPermBanRadio;
  51. vgui::RadioButton *m_pTempBanRadio;
  52. const char *m_cType;
  53. };
  54. #endif // DIALOGADDBAN_H