
-----------------------------------
Soapies
Wed Jun 07, 2006 10:21 pm

I've been using turing for 2 weeks.. I need 5 seconds !!
-----------------------------------
You guys probably have this code memorized so if you wouldn't mind helping me out here...

All I need to do is know how to make a clickable box that .. say.. turns a light red with one click, but then turns the light back to white with another click. 

So far I have been able to make it work with two boxes.. One for ON the other for OFF.. but for my culminating activity .. (we're making a program that will add two binary numbers together then show the correct answer with LEDs on a circuit diagram connected through the parallel port).. and.. yeah I'm having a hard time getting a button that will turn on and off.. 

This is the best I can get (in it's most basic out-of-the-text format)

procedure gui
    locatexy (110, 325)
    put "ON"
    locatexy (110, 200)
    put "OFF"
    locatexy (110, 75)
    put "EXIT"
    drawbox (50, 275, 175, 375, red)
    drawbox (50, 150, 175, 250, red)
    drawbox (50, 25, 175, 125, red)
    drawoval (450, 250, 25, 25, black)
end gui

var x, y, button : int
gui
loop
    mousewhere (x, y, button)
    if button = 1 and 50 