From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- tracker/AdminServer/RawLogPanel.cpp | 87 +++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 tracker/AdminServer/RawLogPanel.cpp (limited to 'tracker/AdminServer/RawLogPanel.cpp') 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 + +#include "RawLogPanel.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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 ); +} -- cgit v1.2.3