
-----------------------------------
chibitenshi_03
Mon Apr 12, 2004 1:59 pm

Fixing a button!
-----------------------------------
I'm trying to make a button within a window. The window allows the user to choose a song and the button is for the user to exit the windosw without choosing a song. 

var number, windID, font5 : int
var x, y, b : int
var name : string
windID := Window.Open ("position:top;center,graphics:400,300")
font5 := Font.New ("ariel:14:bold")
assert font5 > 0
Font.Draw ("Exit", 260, 40, font5, 1)
Font.Free (font5)
drawbox (250, 35, 310, 60, 1)
Mouse.ButtonChoose ("singlebutton")
Mouse.Where (x, y, b)
if x >= 250 and x = 35 and y  0
loop
    put "Please choose a song:"
    put "1. Under the Sea"
    put "2. A Whole New World"
    put "3. Hakuna Matata"
    put "4. Circle of Life"
    put "5. Be Our Guest"
    put "6. Color of the Wind"
    put "7. Can You Fell the Love Tonight"
    put "8. Part of Your World"
    put " "
    put "Enter the number: " ..
    Font.Draw ("Exit", 260, 40, font5, red)
    drawbox (250, 35, 310, 60, black)
    loop
        if hasch then
            get number
        end if
        mousewhere (x, y, b)
        if x >= 250 and x = 35 and y 