When using TYPE[FileDef], the UI will show a button to call a special window accessing a formatted definition file made of triplets: id, name, optional image.
PATH[...] or DIR[...] : directory where the definition file must be found. If omitted, the file selector will start from the system root.
FILE[...] : default filename to be used (must exist in the directory mentioned above or provide here the full name including the path).
ie:
int type; //&& TYPE[FileDef] FILE[entities.def] DIR[$(VSTASKER_DIR)/Runtime/CIGI/Settings]
|
In the above image, the type (int) value stored is 119, but the name displayed is aus_ffh150_anzac (see file below). The Dyn-UI will automatically handle the triplet (id, name, image) from the definition file specified by the tags.
The formatted file must be text based with the following structure:
# Entities
# Aircrafts
118=JTAC_FA18F_RAAF_NG-inventory:img/preview_jtac_fa18f_raaf_223.jpg
171=jtac_b1_lancer
234=MIG_29:img/preview_mig29.jpg
# UAV
199=MQ_1_Predator_UAV-JTAC
#--
#--
# Ships
119=aus_ffh150_anzac:img/aus_anzac.jpg
#--
Each line defined an entry, either a data or a folder definition (opening or closing a level).
A data entry is specified this way: id=name:image filename
id: a uniq value
name: what should be displayed in place of the id. Can contain any character except : and =
image: optional image which can go with the object. Can be a full path or relative to the file definition directory.
|
id must be followed by a = (equal sign) and image filename, if any, must come after a : (colon)
|
When a line starts with # foo it creates a new folder named foo, to store the following data entries.
When a line starts with #-- it closes the latest opened folder.