
-----------------------------------
compnerd101
Sat Jan 14, 2012 4:08 am

Turing button confusion
-----------------------------------
When incorporating buttons into turing programs, why is it nessesary to add the:

loop
  exit when GUI.ProcessEvent
end loop

why is that chunk of code nessesary for buttons to work?

-----------------------------------
Beastinonyou
Sat Jan 14, 2012 7:02 am

Re: Turing button confusion
-----------------------------------
Well, it doesn't have to be, if you make your own buttons. 

all you need to make your own button is:

1. Mouse.Where (x, y, b)    % X, Y, Mouse State
2. Co-ordinates (x1, y1, x2, y2)   % Bottom Left to Top Right
3. Something to do when the User clicks Between your Co-ordinates

-----------------------------------
Aange10
Sat Jan 14, 2012 10:17 am

RE:Turing button confusion
-----------------------------------
But to answer your question, it is what makes the button "press-able".

-----------------------------------
mirhagk
Sat Jan 14, 2012 10:33 am

RE:Turing button confusion
-----------------------------------
It basically handles all the work of checking if the button has been pressed, and responding if it has.
