2021-10-03 16:45:29 +02:00
# Advanced config entries
## Common info
Every advanced entry will be represented as a json object.
Every entry can contain the following properties, regardless of its type:
2021-11-07 10:00:03 +01:00
2022-02-19 15:10:53 +01:00
| Name | Required | Description |
|------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| type | yes | The type of the entries. Each one can contain specific info, more on that below |
| default | yes | The default value for this entry. This is what you would specify in a normal config entry (except for enums, where this is just the default entries name) |
| reloadType | no | `"Resource"` or `"Simple"` , specifies whether resources have to be reloaded if this is changed. Frex shaders will be reloaded anyways |
2021-10-03 16:45:29 +02:00
## Numbers
There are two ways to display numbers: input boxes and sliders.
Sliders can only be used to select whole numbers but are more intuitive for limited inputs.
They also require a minimum and maximum value to be specified.
### Example:
```json
{
2022-06-07 23:23:14 +02:00
id: "examplePack",
version: 6,
capabilities: ["FileFilter", "DirFilter"],
conf: {
someOption: {
type: "slider", // can also be "number" for a normal number
default: 5,
min: 0,
max: 10
2021-10-03 16:45:29 +02:00
}
}
}
```
### Result:
![configExampleSlider ](./img/ExamplePackSlider.png )
## Booleans/Toggles
These do not expose any additional options, look under `Common info` . Their type is `boolean`
## Enum entries/Selecting from a list
The possible values for this entry will be under `values` , while the `default` value will just be a string.
Their type is `enum`
### Example:
```json
{
2022-06-07 23:23:14 +02:00
id: "examplePack",
version: 6,
capabilities: ["FileFilter", "DirFilter"],
conf: {
someOption: {
type: "enum",
default: "Second",
values: ["First", "Second", "Third"]
2021-10-03 16:45:29 +02:00
}
}
}
```
### Result:
2021-11-07 10:00:03 +01:00
![configExampleSlider ](./img/ExamplePackEnum2.png )