## DuSanity.UI

UI tools to show sanity levels and settings

View Source DuAEF_Duik_api.jsxinc, line 33334

# Methods

#### # static button(container, addLabelopt, autoUpdateopt) → {DuButton}

Creates a button to show the current sanity level

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`container` | `Group` |  |  | A ScriptUI group where to add the button
`addLabel` | `boolean` | <optional> | true | Adds a label next to the icon
`autoUpdate` | `boolean` | <optional> | true | If true, the button will be automatically updated according to the current sanity level. Otherwise, call setLevel to change the level.

View Source DuAEF_Duik_api.jsxinc, line 33446

Returns:
The DuButton
Type: `DuButton`

#### # static icon(container, addLabelopt, autoUpdateopt) → {Group}

Creates an icon to show the current sanity level

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`container` | `Group` |  |  | A ScriptUI group where to add the icon
`addLabel` | `boolean` | <optional> | true | Adds a label next to the icon
`autoUpdate` | `boolean` | <optional> | true | If true, the icon will be automatically updated according to the current sanity level. Otherwise, call setLevel to change the level.

View Source DuAEF_Duik_api.jsxinc, line 33346

Returns:
The ScriptUI Group containing the icon and its label
Type: `Group`

#### # static panel(container) → {Group}

Creates a panel showing all tests and current status

##### Parameters:

Name | Type | Description
--- | --- | ---
`container` | `Group` | The ScriptUI Group containing the DuSanity panel

View Source DuAEF_Duik_api.jsxinc, line 33513

Returns:
The panel
Type: `Group`

#### # static test(container, test) → {Group}

Adds the UI to display a test in the UI

##### Parameters:

Name | Type | Description
--- | --- | ---
`container` | `Group` | A ScriptUI group where to add the test report
`test` | `DuSanity.Test` | The test to show

View Source DuAEF_Duik_api.jsxinc, line 33538

Returns:
The ScriptUI Group containing the test report
Type: `Group`