Page 1 of 1
tap button to continue
Posted: Thu May 28, 2015 4:14 am
by Pankaj
What is the simplest way to give an option to continue to next step by tapping a screen 3 times or pressing a volume button.
presently I am inserting pauses but that is not so slick.
Thanks in advance
Re: tap button to continue
Posted: Thu May 28, 2015 4:21 am
by Mr. Kibernetik
Please check examples in sample programs how button press is analyzed.
There are many examples where buttons are used, for example "painter.txt" in Interactive Interface section.
Re: tap button to continue
Posted: Thu May 28, 2015 11:16 am
by Henko
Pankaj wrote:What is the simplest way to give an option to continue to next step by tapping a screen 3 times or pressing a volume button.
presently I am inserting pauses but that is not so slick.
Thanks in advance
Code: Select all
graphics ! graphics clear
draw color 0,0,0
button "nono" title "do NOT press" at 100,100 size 150,100
draw text "Pressing this button will" at 30,240
draw text "destroy your button!" at 60,270
wait: if not button_pressed ("nono") then wait
button "nono" delete ' continue the program
graphics clear ! draw text "You did it" at 50,255
end
Re: tap button to continue
Posted: Mon Jun 01, 2015 2:46 pm
by Pankaj
Henko wrote:Pankaj wrote:What is the simplest way to give an option to continue to next step by tapping a screen 3 times or pressing a volume button.
presently I am inserting pauses but that is not so slick.
Thanks in advance
Code: Select all
graphics ! graphics clear
draw color 0,0,0
button "nono" title "do NOT press" at 100,100 size 150,100
draw text "Pressing this button will" at 30,240
draw text "destroy your button!" at 60,270
wait: if not button_pressed ("nono") then wait
button "nono" delete ' continue the program
graphics clear ! draw text "You did it" at 50,255
end
Thanks Henko for Chaos theory code
I will make it move to the next step .
Pankaj
Re: tap button to continue
Posted: Wed Jun 03, 2015 4:34 pm
by Pankaj
Mr. Kibernetik wrote:Please check examples in sample programs how button press is analyzed.
There are many examples where buttons are used, for example "painter.txt" in Interactive Interface section.
Thanks, I am an absolute beginner, so those were a bit too tricky for me.
However, I have managed with the - Input from keyboard(PROMPT$) routine and used DO UNTIL FIELD_CHANGED as method of pausing.
It is rather crude and unsightly but works.
Pankaj