Add description or category to newoption docs

This commit is contained in:
Thomas Hope 2022-09-09 12:38:39 +01:00
parent db19fa5acc
commit 131713fc60

View File

@ -10,11 +10,12 @@ newoption { description }
| Field | Description | | Field | Description |
|-------------|------------------------------------------------------------------------------------| |-------------|------------------------------------------------------------------------------------|
| trigger | What the user would type on the command line to select the option, e.g. "--name". | | trigger | What the user would type on the command line to select the option, e.g. `--name`. |
| description | A short description of the option, to be displayed in the help text. | | description | A short description of the option, to be displayed in the help text. |
| value | Optional. If the option needs a value, provides a hint to the user what type of data is expected. | | value | Optional. If the option needs a value, provides a hint to the user what type of data is expected. |
| allowed | Optional. A list of key-value pairs listing the allowed values for the option. | | allowed | Optional. A list of key-value pairs listing the allowed values for the option. |
| default | Optional. Sets the default for this option if not specified on the commandline. | | default | Optional. Sets the default for this option if not specified on the commandline. |
| category | Optional. Places the option under a separate header when the user passes `--help` |
### Availability ### ### Availability ###
@ -32,6 +33,7 @@ newoption {
value = "API", value = "API",
description = "Choose a particular 3D API for rendering", description = "Choose a particular 3D API for rendering",
default = "opengl", default = "opengl",
category = "Build Options",
allowed = { allowed = {
{ "opengl", "OpenGL" }, { "opengl", "OpenGL" },
{ "direct3d", "Direct3D (Windows only)" }, { "direct3d", "Direct3D (Windows only)" },