
-----------------------------------
nate
Mon Apr 07, 2003 2:39 pm

GUI Questionaire (2nd turing project)
-----------------------------------
THIS IS MY SECOND TURING PROJECT BUT ONLY THE FIRST PART OF IT. I HAVE ONLY BEEN DOING TURING FOR 3 WEEKS SO IF ITS NOT VERY GOOD,
HAVE PITTY ON ME


import GUI in "%oot/lib/GUI" %Suts up Turing for GUI commands/code
View.Set ("graphics,nobuttonbar")
View.Set ("noecho")
Window.Set (defWinID, "title:!~SECRET TRAINING~!")%Makes title at top of run screen

var score : int := 0 %Score in game
var agentname : string %Name of Agent running program
var questionfont : int := Font.New ("Arial:18:Underline")
var scorefont : int := Font.New ("Arial:14")
var titleFont :int := Font.New ("Arial:26:underline") 
var headerFont :int := Font.New ("Arial:16")
var exdentframe, lineframe : int
var author : string := "By: NATE"
var authorFont : array 1 .. 30 of int 
var collor :int := 0 %This is the color for the 3d text
var winID : int := 0 %This windows ID
%#1 Your height (4 ranges)
var heightcb1, heightcb2, heightcb3, heightcb4 : int %4 height checkboxes
var heightOptionS, heightOptionM, heightOptionL, heightOptionXL : boolean % Four height options
%S= = 10 then
        Font.Draw ("You Passed!", 300, 0, questionfont, blue)
        delay (500)
        cls
        locate (13, 25)
        put "Submiting Questionaire" ..
        delay (500)
        put " . " ..
        delay (500)
        put " . " ..
        delay (500)
        put " . "
        delay (500)
        GUI.Quit
        cls
    elsif score < 10 then
        cls
        Font.Draw ("You Failed!", 300, 0, questionfont, blue)
        delay (1000)
        GUI.Quit
        Window.Close (winID + 1)
    end if
end checkboxgender1

procedure checkboxgender2 (status : boolean)
    genderOption2 := GUI.GetCheckBox (gendercb2)
    GUI.Dispose (gendercb1)
    GUI.Dispose (gendercb2)
    GUI.Dispose (gendercb3)
    cls
    Font.Draw ("To pass written test you need at least 0 points", 20, 200, questionfont, blue)
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
    delay (1000)
    cls
    if score >= 0 then
        Font.Draw ("You Passed!", 230, 200, questionfont, blue)
        delay (500)
        cls
        locate (13, 25)
        put "Submiting Questionaire" ..
        delay (500)
        put " . " ..
        delay (500)
        put " . " ..
        delay (500)
        put " . "
        delay (500)
        GUI.Quit
        cls
    elsif score < 0 then
        cls
        Font.Draw ("You Failed!", 230, 200, questionfont, blue)
        GUI.Quit
        Window.Close (winID + 1)
    end if
end checkboxgender2

procedure checkboxgender3 (status : boolean)
    genderOption3 := GUI.GetCheckBox (gendercb3)
    GUI.Dispose (gendercb1)
    GUI.Dispose (gendercb2)
    GUI.Dispose (gendercb3)
    Font.Draw ("This is serious, obviously you're not ready", 20, 200, questionfont, blue)
    GUI.Quit
    Window.Close (winID + 1)
end checkboxgender3


Font.Draw ("Question 10/10", 0, 380, scorefont, black)
Font.Draw ("What is your gender?", 20, 100, questionfont, red)

Frames

gendercb1 := GUI.CreateCheckBox (10, 50, "Male", checkboxgender1)
gendercb2 := GUI.CreateCheckBox (150, 50, "Female", checkboxgender2)
gendercb3 := GUI.CreateCheckBox (10, 10, "Unknown", checkboxgender3)


genderOption1 := GUI.GetCheckBox (gendercb1)
genderOption2 := GUI.GetCheckBox (gendercb2)
genderOption3 := GUI.GetCheckBox (gendercb3)


loop
    exit when GUI.ProcessEvent
    exit when genderOption1 = true or genderOption2 = true or genderOption3 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Gender) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Hope you like it!!!
-Nate

-----------------------------------
Prince
Mon Apr 07, 2003 6:11 pm


-----------------------------------
umm... wats it supposed to b or do? (havnt tested yet)

-----------------------------------
Asok
Tue Apr 08, 2003 12:05 am


-----------------------------------
it's not too shabby...

the red boxes after the onClick is rather fugly  :( well alot of it is, ie. massive underlined text.

However, it does show a good use and knowledge of GUI, good job :)

-----------------------------------
Prince
Tue Apr 08, 2003 10:07 am


-----------------------------------
good job... if i had more bits (**wink wink**) i would donate sum
