diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /tracker/AdminServer/PlayerPanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'tracker/AdminServer/PlayerPanel.h')
| -rw-r--r-- | tracker/AdminServer/PlayerPanel.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tracker/AdminServer/PlayerPanel.h b/tracker/AdminServer/PlayerPanel.h new file mode 100644 index 0000000..2cf9f91 --- /dev/null +++ b/tracker/AdminServer/PlayerPanel.h @@ -0,0 +1,68 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//============================================================================= + +#ifndef PLAYERPANEL_H +#define PLAYERPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <KeyValues.h> + +#include <vgui_controls/Frame.h> +#include <vgui_controls/PHandle.h> +#include <vgui_controls/ListPanel.h> +#include <vgui_controls/PropertyPage.h> + +#include "PlayerContextMenu.h" +#include "RemoteServer.h" + +//----------------------------------------------------------------------------- +// Purpose: Dialog for displaying information about a game server +//----------------------------------------------------------------------------- +class CPlayerPanel : public vgui::PropertyPage, public IServerDataResponse +{ + DECLARE_CLASS_SIMPLE( CPlayerPanel, vgui::PropertyPage ); +public: + CPlayerPanel(vgui::Panel *parent, const char *name); + ~CPlayerPanel(); + + // returns the keyvalues for the currently selected row + KeyValues *GetSelected(); + +protected: + // property page handlers + virtual void OnResetData(); + virtual void OnThink(); + virtual void OnKeyCodeTyped(vgui::KeyCode code); + + // called when the server has returned a requested value + virtual void OnServerDataResponse(const char *value, const char *response); + +private: + // vgui overrides + virtual void OnCommand(const char *command); + + // msg handlers + MESSAGE_FUNC_INT( OnOpenContextMenu, "OpenContextMenu", itemID ); + MESSAGE_FUNC( OnItemSelected, "ItemSelected" ); + + MESSAGE_FUNC( OnKickButtonPressed, "KickPlayer" ); + MESSAGE_FUNC( OnBanButtonPressed, "BanPlayer" ); + MESSAGE_FUNC( KickSelectedPlayers, "KickSelectedPlayers" ); + MESSAGE_FUNC_CHARPTR_CHARPTR( AddBanByID, "AddBanValue", id, time ); + + vgui::ListPanel *m_pPlayerListPanel; + vgui::Button *m_pKickButton; + vgui::Button *m_pBanButton; + + CPlayerContextMenu *m_pPlayerContextMenu; + + float m_flUpdateTime; +}; + +#endif // PLAYERPANEL_H
\ No newline at end of file |