Computer Science Canada Draw.text and cls, How do i get rid of this text???????? |
Author: | Lekegolo killer [ Sat Feb 21, 2009 5:13 pm ] |
Post subject: | Draw.text and cls, How do i get rid of this text???????? |
How can i clear text placed by the draw.text command? cls doesn't work. |
Author: | BigBear [ Sat Feb 21, 2009 6:03 pm ] |
Post subject: | Re: Draw.text and cls, How do i get rid of this text???????? |
cls should work maybe you should post some code maybe it is clearing but it is in a loop and draws it again. Or you are not updating the screen |
Author: | saltpro15 [ Sat Feb 21, 2009 6:04 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
please post your code in order for us to help you |
Author: | Insectoid [ Sat Feb 21, 2009 6:21 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
I suspect that somehow, the cls isn't being executed. Try drawing something at the same time as the cls, like 'put "test"'. |
Author: | Lekegolo killer [ Sun Feb 22, 2009 4:10 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
ok, here is a sample of the code var font : int font := Font.New ("Orator Std:10") var width : int:= Font.Width ("Orator", font) var height, ascent, descent, internalLeading : int Font.Sizes (font, height, ascent, descent, internalLeading) Draw.Text("c",102,maxy-10,font,white) delay(100) Draw.Text("o",108,maxy-10,font,white) delay(100) Draw.Text("n",114,maxy-10,font,white) delay(100) Draw.Text("f",120,maxy-10,font,white) delay(100) Draw.Text("i",126,maxy-10,font,white) delay(100) Draw.Text("r",132,maxy-10,font,white) delay(100) Draw.Text("m",138,maxy-10,font,white) delay(100) Draw.Text("e",144,maxy-10,font,white) delay(100) Draw.Text("d",150,maxy-10,font,white) delay(100) Draw.Text(".",156,maxy-10,font,white) delay(100) cls |
Author: | andrew. [ Sun Feb 22, 2009 4:25 pm ] | ||||
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? | ||||
It works for me. Just change the text colour from white to black or change the background colour by drawing a big box. e.g.
P.S. Use syntax tags.
@saltpro15: Nice avatar |
Author: | Lekegolo killer [ Thu Feb 26, 2009 11:40 am ] | ||||
Post subject: | Re: RE:Draw.text and cls, How do i get rid of this text???????? | ||||
andrew. @ Sun Feb 22, 2009 4:25 pm wrote: It works for me. Just change the text colour from white to black or change the background colour by drawing a big box.
e.g.
P.S. Use syntax tags.
@saltpro15: Nice avatar that is how i have if but the text still stays. Maybe it is because i am using it in conjunction with put statments? i will post a larger chunk when i get home from shcoolz. |
Author: | S_Grimm [ Thu Feb 26, 2009 11:59 am ] | ||
Post subject: | Re: Draw.text and cls, How do i get rid of this text???????? | ||
You might try
|
Author: | Lekegolo killer [ Thu Feb 26, 2009 12:04 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
I did. |
Author: | saltpro15 [ Thu Feb 26, 2009 3:27 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
"@saltpro15: Nice avatar Wink" why thank you |
Author: | Lekegolo killer [ Mon Mar 02, 2009 12:15 pm ] |
Post subject: | RE:Draw.text and cls, How do i get rid of this text???????? |
i promise to post my whole program tonight! (march 2....OMG MY MILK EXPIRED YESTERDAY AND I DRANK IT! when did it get march?). also tell me what you guys think(once it is up), i have been teaching myself turing so it's not that great and alot of it is cobbled together from other sources. kk so my "program"(short for my craptasic game) is based in the halo universe. here is the code. TURING View.Set("graphics:max;max,nobuttonbar") Draw.FillBox (0,0,1500,800,black) colourback(black) colour(white) %--------------% var Image1 :int := Pic.FileNew ("image1.bmp") %---------------% const year := -99867 const month := 10 const day := 4 var clearence : string var heardofthem : string var foeornot : string var unknownaccess : string var random1 : string var random2 : string var day2 : int var day3 : string var i : int var month2 : string var year3 : string var year2 : int var age : int var meas1 : string var being : string var name : string var font : int font := Font.New ("Orator Std:10") var width : int:= Font.Width ("This is in a Orator font", font) var height, ascent, descent, internalLeading : int Font.Sizes (font, height, ascent, descent, internalLeading) process DoMusic loop Music.PlayFile ("music1.wav") end loop end DoMusic fork DoMusic delay(1000) Pic.Draw (Image1,500,0,0) delay(300) cls delay(100) Pic.Draw (Image1,500,0,0) delay(400) cls delay(100) Pic.Draw (Image1,500,0,0) delay(500) loop delay(1000) Draw.Text("F",0,maxy-10,font,white) delay(100) Draw.Text("h",6,maxy-10,font,white) delay(100) Draw.Text("e",12,maxy-10,font,white) delay(100) Draw.Text("j",18,maxy-10,font,white) delay(100) Draw.Text("e",24,maxy-10,font,white) delay(100) Draw.Text("l",30,maxy-10,font,white) delay(100) Draw.Text("a",36,maxy-10,font,white) delay(100) Draw.Text("t",42,maxy-10,font,white) delay(100) Draw.Text(" ",48,maxy-10,font,white) delay(100) Draw.Text("p",54,maxy-10,font,white) delay(100) Draw.Text("n",60,maxy-10,font,white) delay(100) Draw.Text("u",66,maxy-10,font,white) delay(100) Draw.Text("g",72,maxy-10,font,white) delay(100) Draw.Text("h",78,maxy-10,font,white) delay(100) Draw.Text("t",84,maxy-10,font,white) delay(100) Draw.Text(" ",90,maxy-10,font,white) delay(100) Draw.Text("p",96,maxy-10,font,white) delay(100) Draw.Text("u",102,maxy-10,font,white) delay(100) Draw.Text("b",108,maxy-10,font,white) delay(100) Draw.Text("e",114,maxy-10,font,white) delay(100) Draw.Text("r",120,maxy-10,font,white) delay(100) Draw.Text(".",126,maxy-10,font,white) delay(100) locate(2,1) get random1:* if random1 = "what" or random1 = "i don't understand" or random1 = "hello" or random1 = "bungie" or random1 = "forerunner" or random1 = "what?" or random1="blah blah blah" then exit end if end loop %---------------% delay(2000) loop Draw.Text("F",0,maxy-45,font,white) delay(100) Draw.Text("h",6,maxy-45,font,white) delay(100) Draw.Text("e",12,maxy-45,font,white) delay(100) Draw.Text("j",18,maxy-45,font,white) delay(100) Draw.Text("e",24,maxy-45,font,white) delay(100) Draw.Text("l",30,maxy-45,font,white) delay(100) Draw.Text("a",36,maxy-45,font,white) delay(100) Draw.Text("t",42,maxy-45,font,white) delay(100) Draw.Text(" ",48,maxy-45,font,white) delay(100) Draw.Text("n",54,maxy-45,font,white) delay(100) Draw.Text("o",60,maxy-45,font,white) delay(100) Draw.Text("n",66,maxy-45,font,white) delay(100) Draw.Text(" ",72,maxy-45,font,white) delay(100) Draw.Text("s",78,maxy-45,font,white) delay(100) Draw.Text("e",84,maxy-45,font,white) delay(100) Draw.Text("q",90,maxy-45,font,white) delay(100) Draw.Text("u",96,maxy-45,font,white) delay(100) Draw.Text("i",102,maxy-45,font,white) delay(100) Draw.Text("t",108,maxy-45,font,white) delay(100) Draw.Text("u",114,maxy-45,font,white) delay(100) Draw.Text("r",120,maxy-45,font,white) delay(100) Draw.Text(",",126,maxy-45,font,white) delay(100) Draw.Text("n",132,maxy-45,font,white) delay(100) Draw.Text("o",138,maxy-45,font,white) delay(100) Draw.Text("w",144,maxy-45,font,white) delay(100) Draw.Text("?",150,maxy-45,font,white) delay(100) locate(4,1) get random2:* delay(1000) if random2="latin" or random2="latin?" or random2="I got part of that" or random2="non sequitur" or random2="i got part of that, non sequitur that's latin, right?" or random2="is that latin?" or random2="now?" or random2="now" then exit end if end loop %--------------% Draw.Text("L",0,maxy-10,font,white) delay(100) Draw.Text("a",6,maxy-10,font,white) delay(100) Draw.Text("n",12,maxy-10,font,white) delay(100) Draw.Text("g",18,maxy-10,font,white) delay(100) Draw.Text("u",24,maxy-10,font,white) delay(100) Draw.Text("a",30,maxy-10,font,white) delay(100) Draw.Text("g",36,maxy-10,font,white) delay(100) Draw.Text("e",42,maxy-10,font,white) delay(100) Draw.Text(" ",48,maxy-10,font,white) delay(100) Draw.Text("p",54,maxy-10,font,white) delay(100) Draw.Text("a",60,maxy-10,font,white) delay(100) Draw.Text("t",66,maxy-10,font,white) delay(100) Draw.Text("t",72,maxy-10,font,white) delay(100) Draw.Text("e",78,maxy-10,font,white) delay(100) Draw.Text("r",84,maxy-10,font,white) delay(100) Draw.Text("n",90,maxy-10,font,white) delay(100) Draw.Text(" ",96,maxy-10,font,white) delay(100) Draw.Text("c",102,maxy-10,font,white) delay(100) Draw.Text("o",108,maxy-10,font,white) delay(100) Draw.Text("n",114,maxy-10,font,white) delay(100) Draw.Text("f",120,maxy-10,font,white) delay(100) Draw.Text("i",126,maxy-10,font,white) delay(100) Draw.Text("r",132,maxy-10,font,white) delay(100) Draw.Text("m",138,maxy-10,font,white) delay(100) Draw.Text("e",144,maxy-10,font,white) delay(100) Draw.Text("d",150,maxy-10,font,white) delay(100) Draw.Text(".",156,maxy-10,font,white) delay(100) put "Laungage pattern confirmed." delay(2000) cls Pic.Draw (Image1,500,0,0) locate(maxrow div 2,1) put"Loading".. delay(600) put".".. delay(600) put".".. delay(600) put".".. delay(1500) cls Pic.Draw (Image1,500,0,0) %------------------------% delay(1000) loop put"Requesting year." get year3 if strintok (year3) then year2 := strint (year3) if year2>2007 then exit end if else put"that is not a valid year." delay(500) end if end loop %--------------% loop put"Requesting month." get month2 delay(500) if month2="January"or month2="january"or month2="1" or month2="jan"then i:=1 exit elsif month2="February"or month2="february" or month2="2"or month2="feb"then i:=2 exit elsif month2="March"or month2="march"or month2="3"then i:=3 exit elsif month2 = "April" or month2 = "april" or month2="4"then i:=4 exit elsif month2="May"or month2="may"or month2="5"then i:=5 exit elsif month2="June"or month2="june"or month2="6"then i:=6 exit elsif month2="July"or month2="july"or month2="7"then i:=7 exit elsif month2="august"or month2="August"or month2="8"or month2="aug"then i:=8 exit elsif month2="September"or month2="september"or month2="9"or month2="sept"then i:=9 exit elsif month2="October"or month2="october"or month2="10"or month2="oct"then i:=10 exit elsif month2="november"or month2="November"or month2="11"or month2="nov"then i:=11 exit elsif month2="December"or month2="december"or month2="12"or month2="dec"then i:=12 exit else put"That is not a valid month." delay(500) end if end loop %--------------% loop put"Requesting day." get day3 if strintok(day3)then day2 := strint(day3) if day2<31then exit else put"That is not a valid day." delay(500) end if else put"That is not a valid day." delay(500) end if end loop %--------------% delay(1000) put"Time lapsed since last system Acess, ",year2-year, " years, ",i-month," months, and ",day2-day," days." delay(5000) put"Activating instalation monitor." delay(2000) put"Moniter online and interfacing." delay(2000) cls Pic.Draw (Image1,500,0,0) %--------------------------------------------------------------------------------------------------% procedure gameover delay(5000) cls locate(maxrow div 2,1) put"SENTINALS DISPATCHED TO YOUR LOACATION" delay(6000) cls end gameover %--------------------------------------------------------------------------------------------% procedure restart Pic.Draw (Image1,500,0,0) put"Greatings, my designation is 001 Proof of Concept, what is yours?" get name delay(500) put"hello ", name, "! I am The Monitor of Local Defence Instalation 1, placed in this system to Observe and prevent the spread of the parasite from this planet. May I ask what form of being you are?" get being if being = "forerunner" then put "my my, master forgive me for saying so but your kind has become rather...leinient with naming havn't they? ", name, " what a odd name for a creator" put"Please master, tell me what is your level of clearence?" get clearence put"I am sorry but that is not a valid clearence level." gameover restart else put being,", I have never heard of your Species before" end if delay(1000) loop put"Please, tell me how did you manage to gain access to this Terminal?" get unknownaccess:* if unknownaccess ="I don't know" or unknownaccess = "I am not sure" or unknownaccess = "i dunno" or unknownaccess = "dunno how" or unknownaccess = "i dunno how" or unknownaccess = "i don't now how" or unknownaccess = "i am not sure how" or unknownaccess = "i do not know how" or unknownaccess = "i do not know" or unknownaccess = "i have no idea" or unknownaccess = "i have no clue" or unknownaccess = "no clue" or unknownaccess = "i haven't the slightest"or unknownaccess = "i couldn't tell you" or unknownaccess = "i couldn't tell ya" then exit elsif unknownaccess ="i was sent this as part of a aplication" or unknownaccess = "i was sent this as part of a job aplication" or unknownaccess = "i was sent this" or unknownaccess = "I accessed this from a job aplication" or unknownaccess = "i accessed this from a job aplication" then put"oh i see, my creator sent you, he is quite the genius and make a wonderfull addition to your team" else put"I am terribly sorry but i didn't understand that, my translator can only go so far..." end if delay(500) end loop put"You do not know? How could you not know? Forget it.".. loop put"Are you friend or foe of my masters?" get foeornot:* if foeornot="friend" then put"ah good, after all a friend of the creators is a friend of mine" exit elsif foeornot = "who are your masters?" or foeornot = "your masters?" or foeornot = "who are they?" then loop put "Why the mighty and powerfull foerunners of course! have you no knowledge of them?" get heardofthem:* if heardofthem = "yes" or heardofthem = "yes i have" or heardofthem = "yes i have knowledge of them" then exit elsif heardofthem = "No" or heardofthem = "no i haven't" or heardofthem = "no i don't have knowledge of them" or heardofthem = "no i do not have knowledge of them" then put "how could you not have heard of them if you have gained access to this terminal? I am sorry but this is quite confusing, and I am afaid that I cannot take any chances therfore I must eliminate you. I do hope you understand." gameover restart else put "I am terribly sorry but i didn't understand that, my translator can only go so far..." end if delay(100) end loop elsif foeornot = "foe" then put "I see...it is unfortunate, that this must happen..." gameover restart else put "I am terribly sorry but i didn't understand that, my translator can only go so far..." end if end loop end restart put"please tell me, why..." delay(100) for why: 1..10 put"why..." delay(103) end for %---------------------------------------------------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------------------------------------------------- Pic.Draw (Image1,500,0,0) put "Greatings, my designation is 001 Proof of Concept, what is yours?" get name :* delay(500) put "Hello ", name, "! I am The Monitor of Local Defence Instalation 1, placed in this system to Observe and prevent the spread of the parasite from this planet. May I ask what form of being you are?" get being :* if being = "forerunner" then put "my my, master forgive me for saying so but your kind has become rather...leinient with naming havn't they? ", name, " what a odd name for a creator" put "Please master, tell me what is your level of clearence?" get clearence :* put "I am sorry but that is not a valid clearence level." gameover restart else put being,", I have never heard of your Species before" end if delay(1000) loop put "Please, tell me how did you manage to gain access to this Terminal?" get unknownaccess:* if unknownaccess = "i don't know" or unknownaccess = "i am not sure" or unknownaccess = "i dunno" or unknownaccess = "dunno how" or unknownaccess = "i dunno how" or unknownaccess = "i don't now how" or unknownaccess = "i am not sure how" or unknownaccess = "i do not know how" or unknownaccess = "i do not know" or unknownaccess = "i have no idea" or unknownaccess = "i have no clue" or unknownaccess = "no clue" or unknownaccess = "i haven't the slightest"or unknownaccess = "i couldn't tell you" or unknownaccess = "i couldn't tell ya" then exit elsif unknownaccess = "i was sent this as part of a aplication" or unknownaccess = "i was sent this as part of a job aplication" or unknownaccess = "i was sent this" or unknownaccess = "I accessed this from a job aplication" or unknownaccess = "i accessed this from a job aplication" then put "oh i see, my creator sent you, he is quite the genius and make a wonderfull addition to your team" else put "I am terribly sorry but i didn't understand that, my translator can only go so far..." delay(200) end if delay(500) end loop put "You do not know? How could you not know? Forget it.".. loop put " Are you friend or foe of my masters?" get foeornot:* if foeornot = "friend" then put "ah good, after all a friend of the creators is a friend of mine" exit elsif foeornot = "who are your masters?" or foeornot = "your masters?" or foeornot = "who are they?" then put "Why the mighty and powerfull foerunners of course! have you no knowledge of them?" get heardofthem:* if heardofthem = "yes" or heardofthem = "yes i have" or heardofthem = "yes i have knowledge of them" then exit elsif heardofthem = "No" or heardofthem = "no i haven't" or heardofthem = "no i don't have knowledge of them" or heardofthem = "no i do not have knowledge of them" or heardofthem ="no" then put "how could you not have heard of them if you have gained access to this terminal? I am sorry but this is quite confusing, and I am afaid that I cannot take any chances therfore I must eliminate you. I do hope you understand." gameover restart else put "I am terribly sorry but i didn't understand that, my translator can only go so far..." delay(200) end if elsif foeornot = "foe" then put "I see...it is unfortunate, that this must happen..." gameover restart else put "I am terribly sorry but i didn't understand that, my translator can only go so far..." delay(200) end if end loop put"please tell me, why..." delay(100) for why: 1..10 put"why..." delay(103) end for END TURING and yes i am srry for the length, BTW you will need a picture and some random audio to slap in there to run it. |