Page()
One page of a long dialog. The first time, the user answers the pages one at a time with Next and Back; once everything is answered, the pages show as tabs.
Constructor
Page(title: string)
Parameters
| Parameters | Type | Description |
|---|---|---|
| title | string | The page's title, shown above it and on its tab |
Methods
page:add(view): Page
Adds a question, text or container to the page. Anything Dialog:add() takes, except another Page.
Example
Dialog:init()
Dialog:setTitle("Arena helper")
local setup = Page("Mode")
local mode = RadioGroup(1, 1)
mode:add(RadioButton(1, "Farm"))
mode:add(RadioButton(2, "Arena"))
setup:add(mode:showAsDropdown("Mode"))
setup:add(NumberInput(2, "Runs", 10))
local screen = Page("Screen")
screen:add(TapPicker(3, "Tap the Attack button"))
Dialog:add(setup)
Dialog:add(screen)
Dialog:showIfNeeded()
Notes
- Once a dialog has a page, everything must be inside pages.
- Next waits until every question on the page that needs an answer has one.
- A page can use
showWhento show only for some answers; hidden pages are skipped.