summaryrefslogtreecommitdiff
path: root/utils/vconfig/vconfig_main.h
blob: 6ede1f8fceb43cbbde8ae63e4973932c4b9b9dc8 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//===========================================================================//

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

#include <vgui_controls/Frame.h>
#include <KeyValues.h>

#include "tier2/vconfig.h"
#include "ConfigManager.h"

#define	INVALID_CONFIG_ID	-1
#define	NEW_CONFIG_ID		-2

void UtlStrcpy( CUtlVector<char> &dest, const char *pSrc );

// ==============================================
// Container class for config information
// ==============================================
class CGameConfig
{
public:
	CGameConfig( void ) {}
	CGameConfig( const char *name, const char *dir )
	{
		UtlStrcpy( m_Name, name );
		UtlStrcpy( m_ModDir, dir );
	}

	CUtlVector<char> m_Name;
	CUtlVector<char> m_ModDir;
};

extern CGameConfigManager			g_ConfigManager;
extern CUtlVector<CGameConfig *>	g_Configs;

bool UpdateConfigs( void );
void ReloadConfigs( bool bNoWarning = false );
bool RemoveConfig( int configID );
bool AddConfig( int configID );
bool SaveConfigs( void );
void SetMayaScriptSettings( );
void SetXSIScriptSettings( );
void SetPathSettings( );

const char *GetBaseDirectory( void );
void VGUIMessageBox( vgui::Panel *pParent, const char *pTitle, PRINTF_FORMAT_STRING const char *pMsg, ... );


#endif // VPICKER_MAIN_H