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

Username:   Password: 
 RegisterRegister   
 Font.Drawing Scores
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BigBear




PostPosted: Wed Jan 30, 2008 9:20 pm   Post subject: Font.Drawing Scores

I am wondering if there is a way to Font.Draw or Draw.Text a score because right now I have my game uses locate and using put to display score just in red. This is terrible because locate or Text.Locate goes by amount of rows and colums which changes the position when you change computers. Any Ideas and I look for this thread but if this has been answered I am sorry Just post the other Topic.
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: Wed Jan 30, 2008 9:25 pm   Post subject: RE:Font.Drawing Scores

Font.Draw(scoreVarible,xPosVarible,yPosVarible,fontVarible,color)

that outa do it
ericfourfour




PostPosted: Wed Jan 30, 2008 9:30 pm   Post subject: RE:Font.Drawing Scores

Rember to convert the score variable to a string first.

If you are using an integer, you can use intstr. If you are using a real number, you can use realstr. Their use is pretty straight-forward.
BigBear




PostPosted: Wed Jan 30, 2008 9:33 pm   Post subject: Re: Font.Drawing Scores

Wait just as I was posting this I was thinking if I can only Font.Draw strings then use intstr but then i thought well if that doesn't work then someone will help me. But I figured it out and is working perfectly man I feel stupid lol. I'm with stupid
code:

%MY solution
%instead of
locate (17, 68)
            put score
%i did
score2 := intstr (score)
Font.Draw ("Points: ", maxx div 2 + 40, maxy - 340, font4, brightred)
                Font.Draw (score2, maxx div 2 + 170, maxy - 340, font4, brightred)
BigBear




PostPosted: Wed Jan 30, 2008 9:35 pm   Post subject: Re: Font.Drawing Scores

Yeah thanks was thinking there
Nick




PostPosted: Wed Jan 30, 2008 9:36 pm   Post subject: RE:Font.Drawing Scores

try Font.Draw ("Points: "+ score2, maxx div 2 + 40, maxy - 340, font4, brightred)
BigBear




PostPosted: Thu Jan 31, 2008 8:26 am   Post subject: Re: Font.Drawing Scores

Yeah that's what i did except I didn't need the other variable (score2)
code:
Font.Draw ("Points: " + intstr(score), maxx div 2 + 40, maxy - 340, font4, brightred)
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  [ 7 Posts ]
Jump to:   


Style:  
Search: