Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to make buttons???
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
moon15




PostPosted: Thu Apr 02, 2009 7:42 pm   Post subject: How to make buttons???

Well as some of you know i'm making a game so now I have everything down except for difficulty levels( which I will be working on) and the buttons.When I say buttons I mean when a character comes down the screen I need to click w for witch, m for monster and g for ghost any one who knows where the tutorial for this is please do tell.
Turing:

setscreen ("graphics")
procedure icywitch
    var icywitch : int := Pic.FileNew ("icywitch.bmp")
    for y : 200 .. 600
        Pic.Draw (icywitch, 250, (maxx - y), 0)
        delay (5)
        cls
    end for
end icywitch
procedure ghost
    var ghost : int := Pic.FileNew ("ghost.bmp")
    for y : 200 .. 600
        Pic.Draw (ghost, 250, (maxx - y), 0)
        delay (5)
        cls
    end for
end ghost
procedure blue_monster
    var blue_monster : int := Pic.FileNew ("blue_monster.bmp")
    for y : 200 .. 600
        Pic.Draw (blue_monster, 250, (maxx - y), 0)
        delay (5)
        cls
    end for
end blue_monster
loop
    put "Do you wish to play this spooky freaky intense game?(y/n)*WARNING MAY CAUSE SEIZURES AND WEIRD PROBLEMS"
    var reply : string (1)
    get reply
    cls
    exit when reply not= "y"
    put "Whats your difficulty? (e,m,h)"
    var replydifficulty : string (1)
    get replydifficulty
    exit when replydifficulty = "l"
    if replydifficulty = "e" then
        if replydifficulty = "m" then
            if replydifficulty = "h" then
            end if
        end if
    end if
    loop
        var menace : int := Rand.Int (1, 3)
        if menace = 1 then
            ghost
        elsif menace = 2 then
            icywitch
        elsif menace = 3 then
            blue_monster
        end if
    end loop
end loop
Sponsor
Sponsor
Sponsor
sponsor
moon15




PostPosted: Thu Apr 02, 2009 9:01 pm   Post subject: RE:How to make buttons???

could some 1 assist me by chance????
BigBear




PostPosted: Thu Apr 02, 2009 9:12 pm   Post subject: RE:How to make buttons???

buttons are pretty simple if you know how to use the mouse

just check to see if the x and y position of the mouse are in the certain area and if the button > 0

Meaning they click on the button

then call your procedure or w/e

look into Mouse.Where
Tallguy




PostPosted: Fri Apr 03, 2009 8:03 am   Post subject: RE:How to make buttons???

try like

Turing:

if x>50 and x<100 and y>50 and y<100 and button =0 then
%whatever
end if

so you have a 'spot' on the screen and waiting foe the mouse to be pushed
leafs23




PostPosted: Wed Apr 08, 2009 3:25 pm   Post subject: RE:How to make buttons???

you need to post the pics for it so i can help
Siavash




PostPosted: Wed Apr 08, 2009 4:51 pm   Post subject: RE:How to make buttons???

google it first before you ask.
go to: http://compsci.ca/v3/viewtopic.php?t=3583
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: