summaryrefslogtreecommitdiff
path: root/tracker/AdminServer/MOTDPanel.h
blob: 5e947674fecef8520f29226d056efe4318f0a08d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================

#ifndef MOTDPANEL_H
#define MOTDPANEL_H
#ifdef _WIN32
#pragma once
#endif

#include <VGUI_Frame.h>
#include <VGUI_PHandle.h>
#include <VGUI_ListPanel.h>
#include <VGUI_KeyValues.h>
#include <VGUI_PropertyPage.h>

#include "rcon.h"

class KeyValues;

namespace vgui
{
class Button;
class ToggleButton;
class RadioButton;
class Label;
class TextEntry;
class ListPanel;
class MessageBox;
class ComboBox;
class Panel;
class PropertySheet;
};


//-----------------------------------------------------------------------------
// Purpose: Dialog for displaying information about a game server
//-----------------------------------------------------------------------------
class CMOTDPanel:public vgui::PropertyPage
{
public:
	CMOTDPanel(vgui::Panel *parent, const char *name);
	~CMOTDPanel();

	// property page handlers
	virtual void OnPageShow();
	virtual void OnPageHide();
	void DoInsertString(const char *str);

	void SetRcon(CRcon *rcon);

	virtual void PerformLayout();

private:

	void OnSendMOTD();
	void OnTextChanged(vgui::Panel *panel, const char *text);

	vgui::TextEntry *m_pMOTDPanel;
	vgui::Button *m_pSendMOTDButton;

	CRcon *m_pRcon;
		
	DECLARE_PANELMAP();
	typedef vgui::PropertyPage BaseClass;
};

#endif // MOTDPANEL_H