Castle Game Engine: CastleLevels: Class TLevelInfoList

# Class TLevelInfoList
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleLevels ## Declaration `type TLevelInfoList = class(specialize TFPGObjectList<TLevelInfo>)` ## Description ## Hierarchy TFPGObjectList TLevelInfoList ## Overview ### Methods
| `function FindName(const AName: string): TLevelInfo;`
| `procedure LoadFromFiles(const LevelsPath: string);`
| `procedure LoadFromFiles;`
| `procedure LoadFromConfig;`
## Description ### Methods
| `function FindName(const AName: string): TLevelInfo;`
raises Exception if such Name is not on the list.
| `procedure LoadFromFiles(const LevelsPath: string);`
Add all available levels found by scanning for level.xml inside data directory. Overloaded version without parameter just looks inside ApplicationData. For the specification of level.xml format see [http://castle-engine.sourceforge.net/creating_data_levels.php] . This should be called after resources (creatures and items) are known, as they may be referenced by level.xml files. So call Resources.LoadFromFiles before calling this (if you want to use any creatures / items at all, of course). All TLevelInfo.Played values are initially set to `False`. You must call LoadFromConfig after calling this to read TLevelInfo.Played values from user preferences file.
| `procedure LoadFromFiles;`
| `procedure LoadFromConfig;`
For all available levels, read their TLevelInfo.Played from user preferences. This is useful only if you actually look at TLevelInfo.Played for any purpose (for example, to decide which levels are displayed in the menu). By default, our engine doesn't look at TLevelInfo.Played for anything.
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13