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

Username:   Password: 
 RegisterRegister   
 BASIC GUI.Button program
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Triple Five




PostPosted: Thu Jan 08, 2004 10:49 am   Post subject: BASIC GUI.Button program

heres a basic GUI program that we did in our grade 10 compsci class

code:
% Creating Buttons in OOT
import GUI in "%oot/lib/GUI"
View.Set("graphics:500;300,nocursor,title:creating buttons")
procedure right
for i:0..100
    drawfilloval(maxx div 2+i,maxy div 2,50,50,5)
    delay(15)
    drawfilloval(maxx div 2+i,maxy div 2,50,50,3)
    end for
    drawfilloval(maxx div 2 + 100, maxy div 2,50,50,5)
    end right
   
    procedure left
    for decreasing i:100..0
    drawfilloval(maxx div 2+i,maxy div 2,50,50,5)
    delay(15)
    drawfilloval(maxx div 2+i, maxy div 2,50,50,3)
    end for
    drawfilloval(maxx div 2,maxy div 2,50,50,5)
    end left
   
    GUI.SetBackgroundColor(3)
    drawfilloval(maxx div 2,maxy div 2,50,50,5)
   
    var button1:int:=GUI.CreateButton(50,150,0,"Move Left",left)
    var button2:int:=GUI.CreateButton(50,200,0,"Move Right",right)
   
    var quitButton:=GUI.CreateButton(400,10,0,"Quit",GUI.Quit)
    loop
    exit when GUI.ProcessEvent
    end loop
    put "Finished"


Very Happy
Sponsor
Sponsor
Sponsor
sponsor
Thuged_Out_G




PostPosted: Thu Jan 08, 2004 3:09 pm   Post subject: (No subject)

i had to teach myself everything about GUI...we havent learned shit barely in compsci lol

functions/procedures
put/get from a file
records
arrays/2D arrays
loops Laughing
and that is pretty much it, anything else i tought myself...and this is gr.11 compsci Confused
Maverick




PostPosted: Thu Jan 08, 2004 3:38 pm   Post subject: (No subject)

Wow we learned that in like mid Grade 10.
Triple Five




PostPosted: Thu Jan 08, 2004 8:07 pm   Post subject: (No subject)

our teacher is preaty good with turing stuff! if we want to learn someing that not in the program he'll print off a sheet for us about the program and teach us the code and explain it to us! Very Happy
shorthair




PostPosted: Tue Jan 13, 2004 7:12 pm   Post subject: (No subject)

our teacher apparently made the payroll system for the big-B , it was a 180 program PROGRAM, hes a really good teacher , and we take part in all the contests and usually make it to toronto
kalin




PostPosted: Wed Jan 21, 2004 5:08 pm   Post subject: (No subject)

thats a cool program. should make it so that you can shoot it or something...make a game out of it
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: