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

Username:   Password: 
 RegisterRegister   
 Turing Title Bar Help!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
moler




PostPosted: 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> Smile
Sponsor
Sponsor
Sponsor
sponsor
Geniis




PostPosted: Tue Apr 14, 2009 9:18 pm   Post subject: Re: Turing Title Bar Help!!

You can change the title of a window by using :
Turing:

setscreen("title:desired title")


So say your score is stored in an integer variable you can set it as title using :
Turing:

setscreen("title:" + intstr(score))


But doing this you would have to change the windows title every time the score changed.
Zren




PostPosted: 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: Sad
moler




PostPosted: Wed Apr 15, 2009 6:58 am   Post subject: Re: Turing Title Bar Help!!

Thanks a lot everyone Smile
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  [ 4 Posts ]
Jump to:   


Style:  
Search: