
-----------------------------------
Bobby321
Thu Jan 19, 2012 6:53 pm

Help making an exit button on this program using GUI
-----------------------------------
What is it you are trying to achieve?
Making an exit button on this program using GUI so the user can exit and start all over.


What is the problem you are having?
For some reason the GUI button isn't working...


Describe what you have tried to solve this problem
Researched..


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
import GUI
setscreen ("nocursor")
setscreen ("noecho")

% Button
var exitButton : int := 0

procedure drawrectangle
    %screen formatting
    setscreen ("graphics:800;400")
    %orange button
    var number : int
    var rangeX, rangeY, button : int
    cls
    drawfillbox (200, 50, 250, 100, 42)
    %keyboard input
    put "Enter your temperature in farenheit from -4 to 68"
    get number
    put "Your temperature in celcius is:", (5 / 9) * (number - 32);
    put "Click on the orange box to repeat"


    %Mouse input
    loop
        mousewhere (rangeX, rangeY, button)
        if (rangeX >= 200 and rangeX = 50 and rangeY 