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

Username:   Password: 
 RegisterRegister   
 beginner need help for button!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Lucy Xu




PostPosted: Sun Apr 21, 2013 7:00 pm   Post subject: beginner need help for button!!

What is it you are trying to achieve?
i was the beginner of turing and i need made a start button on the middle of my screen to let it go to next page.
And i really need someone can help me to make both of this things happen . thanks Smile
And only code i have is
Turing:

setscreen ("graphics:max;max")
setscreen ("offscreenonly")
%picture #
var pic1  : int := Pic.FileNew ("beach1.jpg")
%first scene
Pic.Draw (pic1, 0,0, picMerge)
var start:int

Sponsor
Sponsor
Sponsor
sponsor
Lucy Xu




PostPosted: Sun Apr 21, 2013 7:08 pm   Post subject: RE:beginner need help for button!!

finally i make this right
Raknarg




PostPosted: Sun Apr 21, 2013 7:16 pm   Post subject: RE:beginner need help for button!!

wait so did you solve it or not
Lucy Xu




PostPosted: Sun Apr 21, 2013 7:34 pm   Post subject: RE:beginner need help for button!!

i am not solve it ..... this is what i have now and i don't know what i should do next.
Raknarg




PostPosted: Sun Apr 21, 2013 7:53 pm   Post subject: RE:beginner need help for button!!

so do you want to make your own buttons? Or have you heard about turing GUI button function?
Lucy Xu




PostPosted: Sun Apr 21, 2013 8:25 pm   Post subject: RE:beginner need help for button!!

is it possible for me to make my own button? or which way is more easily to understand?
Raknarg




PostPosted: Sun Apr 21, 2013 8:40 pm   Post subject: RE:beginner need help for button!!

well learning to make your own buttons will probably help you in the long run.

Of course you can! There's a command in turing called Mouse.Where (x, y, b). You make three variables that represent your mouses x, y and button values, and every time you call the procedure, it will update your mouses state. Here's a simple example:

Turing:

var mx, my, mb : int
loop
    Mouse.Where (mx, my, mb)
    if mb = 0 then
        Draw.FillOval (mx, my, 10, 10, brightred)
    else
        Draw.FillOval (mx, my, 10, 10, brightblue)
    end if
end loop


So when mb = 0, that means that no button is being pressed. If it is a 1, then it is being pressed. This program here makes a red trail when no button is pressed, and a blue one when it is.

This Mouse.Where, you can make your own buttons. If you still need help, I'll show you how to make a super basic one.
Lucy Xu




PostPosted: Fri Apr 26, 2013 6:36 pm   Post subject: RE:beginner need help for button!!

thanks!!
i got it ~~
Sponsor
Sponsor
Sponsor
sponsor
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  [ 8 Posts ]
Jump to:   


Style:  
Search: