@@ -38,16 +38,13 @@ The pipeline looks like this:
3838** "State value"** -> ** value_proc** -> ** value_str_proc**
3939
4040The script file runs in a ** sandboxed environment** , that includes a few standard libs:
41- **
4241```
4342math
4443string
4544table
4645```
47- **
4846
4947With some functions from the ` base ` library:
50- **
5148```
5249assert
5350error
@@ -60,8 +57,7 @@ tostring
6057type
6158pcall
6259xpcall
63- ```
64- **
60+ ```
6561
6662Each script can contain the following callback functions:
6763
@@ -184,6 +180,23 @@ __OPTIONS = {
184180| combo | integer, index of the ` options ` , begins from 0 |
185181| hotkey | none |
186182
183+ ### Functions
184+ #### getOptionValue(key_str [ , default_value] )
185+ Returns the option value.
186+ __ Usage:__
187+ ` local opt1 = getOptionValue("option_key") `
188+
189+ or with default value:
190+
191+ ` local opt1 = getOptionValue("option_key", "Default String") `
192+
193+ #### setOptionValue(key_str, value)
194+ Allows to set a value for the option.
195+ __ Usage:__
196+ ` setOptionValue("option_key", "New String") `
197+
198+ ** Note:** Only initial type of the value is allowed to set.
199+
187200### Groups
188201You can make a group of the options, simply add a name key to the table right before the options.
189202
@@ -214,19 +227,3 @@ __OPTIONS = {
214227}
215228```
216229Maximum level of group depth is 2.
217-
218- #### getOptionValue(key_str [ , default_value] )
219- Returns the option value.
220- __ Usage:__
221- ` local opt1 = getOptionValue("option_key") `
222-
223- or with default value:
224-
225- ` local opt1 = getOptionValue("option_key", "Default String") `
226-
227- #### setOptionValue(key_str, value)
228- Allows to set a value for the option.
229- __ Usage:__
230- ` setOptionValue("option_key", "New String") `
231-
232- ** Note:** Only initial type of the value is allowed to set.
0 commit comments