summaryrefslogtreecommitdiff
path: root/gameui/CvarTextEntry.h
blob: 8e3ad14ba397f15df30278109bd14556fdbe40ab (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef CVARTEXTENTRY_H
#define CVARTEXTENTRY_H
#ifdef _WIN32
#pragma once
#endif

#include <vgui_controls/TextEntry.h>

class CCvarTextEntry : public vgui::TextEntry
{
	DECLARE_CLASS_SIMPLE( CCvarTextEntry, vgui::TextEntry );

public:
	CCvarTextEntry( vgui::Panel *parent, const char *panelName, char const *cvarname );
	~CCvarTextEntry();

	MESSAGE_FUNC( OnTextChanged, "TextChanged" );
	void			ApplyChanges(  bool immediate = false );
	virtual void	ApplySchemeSettings(vgui::IScheme *pScheme);
    void            Reset();
    bool            HasBeenModified();

private:
	char			*m_pszCvarName;
	char			m_pszStartValue[64];
};

#endif // CVARTEXTENTRY_H