Provides miniquake2 client ui menu facilities for this project.
# action
function action(id, label, command)
Performs the action operation for the miniquake2 client ui menu module.
| Parameter | Type | Default | Description |
|---|
id | dynamic | — | Stable identifier of the affected item. |
label | dynamic | — | label value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
View source
# choice
function choice(id, label, value, choices, command)
Return the choice value.
| Parameter | Type | Default | Description |
|---|
id | dynamic | — | Stable identifier of the affected item. |
label | dynamic | — | label value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
choices | dynamic | — | choices value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
View source
# drawMain
function drawMain(menu, screenWidth, screenHeight, now, exports)
Draw main.
| Parameter | Type | Default | Description |
|---|
menu | dynamic | — | menu value consumed by this operation. |
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
screenHeight | dynamic | — | screenHeight value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
exports | dynamic | — | exports value consumed by this operation. |
View source
# field
function field(id, label, value, maximumLength, command)
Return the field value.
| Parameter | Type | Default | Description |
|---|
id | dynamic | — | Stable identifier of the affected item. |
label | dynamic | — | label value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
maximumLength | dynamic | — | maximumLength value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
View source
# mainCursorName
function mainCursorName(now)
Return the main cursor name.
| Parameter | Type | Default | Description |
|---|
now | dynamic | — | now value consumed by this operation. |
View source
# setActionCommand
function setActionCommand(menu, pageId, itemId, text, command, enabled)
Set action command.
| Parameter | Type | Default | Description |
|---|
menu | dynamic | — | menu value consumed by this operation. |
pageId | dynamic | — | Identifier of page. |
itemId | dynamic | — | Identifier of item. |
text | dynamic | — | Text consumed by the operation. |
command | dynamic | — | command value consumed by this operation. |
enabled | dynamic | — | enabled value consumed by this operation. |
View source
# slider
function slider(id, label, value, minimum, maximum, step, command)
Return the slider value.
| Parameter | Type | Default | Description |
|---|
id | dynamic | — | Stable identifier of the affected item. |
label | dynamic | — | label value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
minimum | dynamic | — | minimum value consumed by this operation. |
maximum | dynamic | — | maximum value consumed by this operation. |
step | dynamic | — | step value consumed by this operation. |
command | dynamic | — | command value consumed by this operation. |
View source
# toggle
function toggle(id, label, value, command)
Toggle state.
| Parameter | Type | Default | Description |
|---|
id | dynamic | — | Stable identifier of the affected item. |
label | dynamic | — | label value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
command | dynamic | — | command value consumed by this operation. |
View source