メインコンテンツまでスキップ

TapListPicker()

The user taps several spots on their own screen, in order. Each marker shows its number and can be dragged. The answer is a list of Points.

Three numbered spots

Constructor​

TapListPicker(id: number, text: string, maxTaps: number)

Parameters​

ParametersTypeDescription
idnumberThe question's id, for Dialog:getValueById()
textstringThe instruction, such as "Tap your skills in order"
maxTapsnumberThe most spots the user can tap; at least 1

Example​

Dialog:init()
Dialog:add(TapListPicker(1, "Tap your skills in order", 4))
Dialog:showIfNeeded()
for _, skill in ipairs(Dialog:getValueById(1)) do
Screen:click(skill, ClickParams())
end

Notes​

  • The user must tap at least one spot before OK, unless you call setRequired(false). The answer is then an empty list.
  • If the user's screen size changes, the picks no longer fit and the dialog asks for them again.