Parameter | Description |
---|---|
sPath | The directory to search for skin files. If "", the default skin path is searched |
bRecursive | If true, sub-directories are also searched |
Returns an array of tSkinInformation, representing all skins files and sections found
Function EnumerateSkins String sPath Boolean bRecursive Returns tSkinInformation[]
Call: | Get EnumerateSkins sPath bRecursive to tSkinInformationArrayVariable |
EnumerateSkins searches a directory path and to returns an array of all skins and skin sections. This array can be used to determine what skins are available.
The sPath parameter determines which path to search. If sPath is "", the default skin directory will be searched. The default directory is determined by calling SkinPath. Unless this function is changed, the default path is the workspace's programs directory.
The bRecursive detertmines if the search should search sub-directories.
EnumerateSkins returns an array of tSkinInformation. tSkinInformation is a struct defined as:
tSkinInformation Element | Description |
---|---|
sName | The name/description of the Skin file |
sSkinFile | The file name and path of the skin file. This will be a relative path if the file is located under the default skin directory, else a qualified path. |
sSkinIni | The name of the skin section within the file |
Procedure LoadSkinsAndApplyFirst Integer i iSkinsCount tSkinInformation[] Skins // get all skins in the default skin path Get EnumerateSkins of ghoSkinFramework "" True to Skins // Display all of the skin information Move (SizeOfArray(Skins)) to iSkinsCount For i from 0 to (iSkinsCount-1) Send AddSkinsToList Skins[i].sName Skins[i].sSkinFile Skins[i].sSkinIni Loop // make the first skin the current skin If (iSkinsCount=0) Begin // if no skin, apply an empty skin (no skin will be applied) Set psSkinFile to "" Set psSkinIni to "" End Else Begin Set psSkinFile to Skins[0].sSkinFile Set psSkinIni to Skins[0].sSkinIni End Send ApplySkin of ghoSkinFramework End_ProcedureSee Also
SkinPath | ApplySkin | psSkinFile | psSkinIni