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

Username:   Password: 
 RegisterRegister   
 GUI.CreateButton in procedure
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Azzy




PostPosted: Wed Nov 05, 2003 7:22 pm   Post subject: GUI.CreateButton in procedure

i need to make the following code for an rpg i'm making.
code:
procedure stats
put "Strength         ",strength
put "Agility          ",agility
put "Vitality         ",vitality
put "Luck             ",luck
put "Charisma         ",charisma
put "Intelligence     ",intelligence
put "Wisdom           ",wisdom

draw:= GUI.CreateButtonFull (5, 10, 0, "Strength",
            strength2, 0, '^D', true)
draw:= GUI.CreateButtonFull (85, 10, 0, "Agility",
            agility2, 0, '^D', true)
draw:= GUI.CreateButtonFull (155, 10, 0, "Vitality",
            vitality2, 0, '^D', true)
draw:= GUI.CreateButtonFull (230, 10, 0, "Luck",
            luck2, 0, '^D', true)
draw:= GUI.CreateButtonFull (290, 10, 0, "Charisma",
            charisma2, 0, '^D', true)
draw:= GUI.CreateButtonFull (375, 10, 0, "Intelligence",
            intelligence2, 0, '^D', true)
draw:= GUI.CreateButtonFull (470, 10, 0, "Wisdom",
            wisdom2, 0, '^D', true)           
stat:=strength+agility+vitality+luck+charisma+intelligence+wisdom
if stat<=70 then
cls
stats
else
end if
end stats


i need it to keep running the program until all of the stats=70.but when i do a loop it doesn't let you press the buttons, and when i try delay it still won't let you touch the buttons.can some one help me?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 06, 2003 9:53 am   Post subject: (No subject)

You're missing GUI.ProcessEvent

You need that run in a loop for GUI to work.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Fri Nov 07, 2003 11:32 pm   Post subject: (No subject)

inside a loop
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  [ 3 Posts ]
Jump to:   


Style:  
Search: