blob: ba9279fdf0107c6ab7d4977dcb3759b6f988a8fb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
//========= 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");
}
|