Computer Science Canada

Need help with buttons

Author:  CM3Y3R [ Fri May 03, 2013 11:45 pm ]
Post subject:  Need help with buttons

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
Me and my friends have to make a game for our programing class and im designing the menu and im trying to make it so that i can click on the help button and it opens to the instructions image i have created the problem is is that i made the look of the help button and image and have imported it so how would i go about making that image clickable and making it do what i want it to(sorry if i explained this badly)

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:


var window : int

window := Window.Open ("position:0,0;graphics:1024,768;nocursor")
var i : int := 0
process playstuff
    loop
        Music.PlayFile ("TitleSong.mp3")
    end loop
end playstuff

fork playstuff
var pel : int
pel := Pic.FileNew ("WePresent.BMP")
Pic.Draw (pel, 0, 0, picMerge)
delay (10006)
Draw.Cls
delay (1000)
var pic : int
pic := Pic.FileNew ("Menu title.BMP")
Pic.Draw (pic, 0, 0, picMerge)

var pl : int
pic := Pic.FileNew ("Play.BMP")
Pic.Draw (pic, 400, 400, picMerge)


var pee : int
pic := Pic.FileNew ("2P.BMP")
Pic.Draw (pic, 400, 300, picMerge)

%this here is the help button and is what i want to be clickable
var pie : int
pic := Pic.FileNew ("Help.BMP")
Pic.Draw (pic, 400, 200, picMerge)


Please specify what version of Turing you are using
4.1

Author:  Tony [ Sat May 04, 2013 1:06 am ]
Post subject:  Re: Need help with buttons

CM3Y3R @ Fri May 03, 2013 11:45 pm wrote:

Me and my friends have to make a game for our programing class and im designing the menu and im trying to make it so that i can click on the help button and it opens to the instructions image i have created the problem is is that i made the look of the help button and image and have imported it so how would i go about making that image clickable and making it do what i want it to(sorry if i explained this badly)

Perhaps you can explain it better, if you used more than one sentence.

You also didn't fill out the "Describe what you have tried to solve this problem" section.


: