mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-23 14:46:53 +00:00
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
|
//========= 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");
|
||
|
}
|
||
|
|
||
|
|