MenuButton
This view allows you to display a button that, upon user tapping, will display a pop-up list of options. Once an option is selected, an event with that option's id as the event name will be fired. This is usually paired with a mechanic that does something for the player (e.g: long rest).
JSON Format
{
"type": "menuButton",
"id": ...,
"type": ...,
"margin_left": ...,
"margin_right": ...,
"margin_top": ...,
"margin_bottom": ...,
"is_visible": ...,
"validation_message": ...,
"icon_size": ...,
"icon_name": ...,
"icon_color": ...,
"options": ...,
"allowed_options": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
allowed_options | StatFormulaComponent | Optional. Defaults to all options. A stat formula for a list of string ids, corresponding to the options from the given enumerated type that you want to be displayed for the user as eligible options.@type array<string> |