Skip to content

Commit

Permalink
Add range widget explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
wallslide committed Aug 7, 2020
1 parent 7b726cd commit cdc7597
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true
"editor.formatOnPaste": true,
"editor.tabSize": 2
}
46 changes: 46 additions & 0 deletions docs/widgets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,50 @@ DIALOG birthday
/DIALOG
RUN birthday
```
</WizardMode>

## Range

::: warning
The `range` widget is currently only available in form-mode based scripts
:::

The `range` widget lets users choose a number between `min` and `max` values that the scriptwriter chooses. The scriptwriter can also choose an optional `unit` label.
<br/>
<br/>

<FormMode>
```
DIALOG range
TEMPLATE range
{
formText: "Minutes",
min: 10,
max: 20,
unit: "分"
}
"How long did it take?"
>>minutes
/TEMPLATE
/DIALOG
RUN range
```
</FormMode>

<WizardMode hideScript>
```
DIALOG range
TEMPLATE range
{
formText: "Minutes",
min: 10,
max: 20,
unit: "分"
}
"How long did it take?"
>>minutes
/TEMPLATE
/DIALOG
RUN range
```
</WizardMode>

0 comments on commit cdc7597

Please sign in to comment.