Posted: Tue Apr 14, 2009 9:04 pm Post subject: Turing Title Bar Help!!
What is it you are trying to achieve?
Hey everyone im new in turing and im taking a grade 10 class on it. Me and my friend were making a game for one of our projects and we were wondering how do you put the score of our game in the title bar instead of the file name?; on the top of the window.
Thanks for your help Smile
What is the problem you are having?
Idk how to do
Describe what you have tried to solve this problem
Looked through Compsci.ca
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing:
<Add your code here>
Please specify what version of Turing you are using
<Answer Here>
Sponsor Sponsor
Geniis
Posted: Tue Apr 14, 2009 9:18 pm Post subject: Re: Turing Title Bar Help!!
But doing this you would have to change the windows title every time the score changed.
Zren
Posted: Tue Apr 14, 2009 9:22 pm Post subject: Re: Turing Title Bar Help!!
View.Set() is the function that has most of the control over the Turing Window. This includes the title text. It takes one parameter which is a string. So if your score is an integer, you'll have to convert it to a string.
intstr() converts an integer to a string.
View.Set("title:Lolz") will get Lolz in the window. View.Set("title:Score - "+intstr(score)) will output Score - 24 if score had the value 24.
Edit:
moler
Posted: Wed Apr 15, 2009 6:58 am Post subject: Re: Turing Title Bar Help!!