Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.4 KiB

5 years ago
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "DemoPage.h"
#include <VGUI/IVGui.h>
#include <Keyvalues.h>
#include <vgui_controls/Controls.h>
#include <vgui_controls/TextEntry.h>
using namespace vgui;
class SampleEditFields: public DemoPage
{
public:
SampleEditFields(Panel *parent, const char *name);
~SampleEditFields();
private:
TextEntry *m_pTextEntry;
};
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
SampleEditFields::SampleEditFields(Panel *parent, const char *name) : DemoPage(parent, name)
{
m_pTextEntry = new TextEntry (this, "ATextEntry");
int wide, tall;
m_pTextEntry->GetSize(wide, tall);
m_pTextEntry->SetBounds(150, 200, 150, tall);
m_pTextEntry->InsertString("with content");
m_pTextEntry->SetEnabled(false);
LoadControlSettings("Demo/SampleEditFields.res");
}
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
SampleEditFields::~SampleEditFields()
{
}
Panel* SampleEditFields_Create(Panel *parent)
{
return new SampleEditFields(parent, "Edit Fields");
}