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/RawLogPanel.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'tracker/AdminServer/RawLogPanel.cpp')
| -rw-r--r-- | tracker/AdminServer/RawLogPanel.cpp | 87 |
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 ); +} |