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
tap button to continue
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: tap button to continue
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.
There are many examples where buttons are used, for example "painter.txt" in Interactive Interface section.
-
- Posts: 814
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
Re: tap button to continue
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
Thanks Henko for Chaos theory codeHenko 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 advanceCode: 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
I will make it move to the next step .
Pankaj
Re: tap button to continue
Thanks, I am an absolute beginner, so those were a bit too tricky for me.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.
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