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.

53 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PLAYERLISTDIALOG_H
  8. #define PLAYERLISTDIALOG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. #include "steam/steamclientpublic.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: List of players, their ingame-name and their friends-name
  16. //-----------------------------------------------------------------------------
  17. class CPlayerListDialog : public vgui::Frame
  18. {
  19. DECLARE_CLASS_SIMPLE( CPlayerListDialog, vgui::Frame );
  20. public:
  21. CPlayerListDialog(vgui::Panel *parent);
  22. ~CPlayerListDialog();
  23. virtual void Activate();
  24. private:
  25. MESSAGE_FUNC( OnItemSelected, "ItemSelected" );
  26. virtual void OnCommand(const char *command);
  27. void ToggleMuteStateOfSelectedUser();
  28. void RefreshPlayerProperties();
  29. void OnKeyCodePressed( vgui::KeyCode code )
  30. {
  31. if ( code == KEY_XBUTTON_B )
  32. {
  33. Close();
  34. }
  35. else
  36. {
  37. BaseClass::OnKeyCodePressed(code);
  38. }
  39. }
  40. vgui::ListPanel *m_pPlayerList;
  41. vgui::Button *m_pMuteButton;
  42. };
  43. #endif // PLAYERLISTDIALOG_H