summaryrefslogtreecommitdiff
path: root/tracker/AdminServer/RawLogPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker/AdminServer/RawLogPanel.cpp')
-rw-r--r--tracker/AdminServer/RawLogPanel.cpp87
1 files changed, 87 insertions, 0 deletions
diff --git a/tracker/AdminServer/RawLogPanel.cpp b/tracker/AdminServer/RawLogPanel.cpp
new file mode 100644
index 0000000..8dc8252
--- /dev/null
+++ b/tracker/AdminServer/RawLogPanel.cpp
@@ -0,0 +1,87 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#include <stdio.h>
+
+#include "RawLogPanel.h"
+
+#include <vgui/ISystem.h>
+#include <vgui/ISurface.h>
+#include <vgui/IVGui.h>
+#include <vgui/ILocalize.h>
+#include <KeyValues.h>
+
+#include <vgui_controls/Label.h>
+#include <vgui_controls/TextEntry.h>
+#include <vgui_controls/RichText.h>
+#include <vgui_controls/Button.h>
+#include <vgui_controls/ToggleButton.h>
+#include <vgui_controls/RadioButton.h>
+#include <vgui_controls/ListPanel.h>
+#include <vgui_controls/ComboBox.h>
+#include <vgui_controls/PHandle.h>
+#include <vgui_controls/PropertySheet.h>
+#include "vgui_controls/ConsoleDialog.h"
+
+using namespace vgui;
+
+//-----------------------------------------------------------------------------
+// Purpose: Constructor
+//-----------------------------------------------------------------------------
+CRawLogPanel::CRawLogPanel(vgui::Panel *parent, const char *name) : vgui::PropertyPage(parent, name)
+{
+ SetSize(200, 100);
+ m_pConsole = new CConsolePanel( this, "Console", false );
+
+ LoadControlSettings("Admin\\RawLogPanel.res", "PLATFORM");
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Destructor
+//-----------------------------------------------------------------------------
+CRawLogPanel::~CRawLogPanel()
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Activates the page
+//-----------------------------------------------------------------------------
+void CRawLogPanel::OnPageShow()
+{
+ BaseClass::OnPageShow();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Hides the page
+//-----------------------------------------------------------------------------
+void CRawLogPanel::OnPageHide()
+{
+ BaseClass::OnPageHide();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: inserts a new string into the main chat panel
+//-----------------------------------------------------------------------------
+void CRawLogPanel::DoInsertString(const char *str)
+{
+ if ( str )
+ {
+ m_pConsole->Print( str );
+ }
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: run when the send button is pressed, execs a command on the server
+//-----------------------------------------------------------------------------
+void CRawLogPanel::OnCommandSubmitted( char const *pchCommand )
+{
+ if ( !pchCommand || !*pchCommand )
+ return;
+
+ // execute the typed command
+ RemoteServer().SendCommand( pchCommand );
+}