| 1 |
{ |
| 2 |
Copyright 2006-2018 Michalis Kamburelis. |
| 3 |
|
| 4 |
This file is part of "Castle Game Engine". |
| 5 |
|
| 6 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 7 |
included in this distribution, for details about the copyright. |
| 8 |
|
| 9 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
---------------------------------------------------------------------------- |
| 14 |
} |
| 15 |
|
| 16 |
{ Loading and saving user preferences (UserConfig). } |
| 17 |
unit CastleConfig; |
| 18 |
|
| 19 |
{$I castleconf.inc} |
| 20 |
|
| 21 |
interface |
| 22 |
|
| 23 |
uses SysUtils, CastleXMLConfig; |
| 24 |
|
| 25 |
type |
| 26 |
TCastleConfig = CastleXMLConfig.TCastleConfig; |
| 27 |
|
| 28 |
{ User preferences. |
| 29 |
See https://castle-engine.io/manual_user_prefs.php . } |
| 30 |
function UserConfig: TCastleConfig; |
| 31 |
|
| 32 |
function Config: TCastleConfig; deprecated 'use UserConfig'; |
| 33 |
|
| 34 |
implementation |
| 35 |
|
| 36 |
var |
| 37 |
FUserConfig: TCastleConfig; |
| 38 |
|
| 39 |
function UserConfig: TCastleConfig; |
| 40 |
begin |
| 41 |
Result := FUserConfig; |
| 42 |
end; |
| 43 |
|
| 44 |
function Config: TCastleConfig; |
| 45 |
begin |
| 46 |
Result := UserConfig; |
| 47 |
end; |
| 48 |
|
| 49 |
initialization |
| 50 |
FUserConfig := TCastleConfig.Create(nil); |
| 51 |
finalization |
| 52 |
FreeAndNil(FUserConfig); |
| 53 |
end. |