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

Username:   Password: 
 RegisterRegister   
 Turing for Dummies #1 --> How to do texts
Index -> Programming, Turing -> Turing Tutorials
Goto page Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
yetiboy




PostPosted: Tue Jun 01, 2010 8:40 am   Post subject: Re: Turing for Dummies #1 --> How to do texts

Is there a way to change the font/text the user types with? I'd like to match up the user input with what I'm using in Font.Draw.

brad
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Tue Jun 01, 2010 9:27 am   Post subject: RE:Turing for Dummies #1 --> How to do texts

Not trivially; if you want that effect you'll have to write a bit of code to do it yourself. There's a very similar request in the Turing Help section recently; try looking there for it.
Insectoid




PostPosted: Tue Jun 01, 2010 3:11 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

I did one in my blackjack program last year. It's not perfect, and I forgot some features but you can see how I went about doing it. There's some hackish code in my implementation but it works and not to shabbily.
chrisbrown




PostPosted: Tue Jun 01, 2010 4:15 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

Just so you have a starting point:
    Begin with an empty string
    Read one character at a time using hasch and getch or getchar (trivial difference)
    Modify the string, handling the special cases for enter and backspace
    Font.Draw the string


@Insectoid: I'm sure you had your reasons for doing so, but drawing one character at a time makes me cringe.
Insectoid




PostPosted: Tue Jun 01, 2010 5:40 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

I think it was 'cause I didn't want to clear/update the screen and this way I could just draw a box over the old letters to 'erase' it.
Krocker




PostPosted: Thu Jan 20, 2011 11:55 am   Post subject: RE:Turing for Dummies #1 --> How to do texts

is there a way of adding an entrance effect to Font.Draw?
Insectoid




PostPosted: Thu Jan 20, 2011 12:00 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

If you mean things like drawing letters one at a time, easy. Just use a for loop and Font.Draw one letter of a string at a time.
Krocker




PostPosted: Thu Jan 20, 2011 12:49 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

interesting, but no. i meant like fade ins and text swirling into the center, blah, blah. that sort of animation
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Jan 20, 2011 12:51 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

Yes, but you have to anime all the steps yourself. Similar advice applies -- use for-loops.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Krocker




PostPosted: Thu Jan 20, 2011 1:05 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

k , nvm
compnerd101




PostPosted: Tue Jan 03, 2012 12:16 am   Post subject: Re: Turing for Dummies #1 --> How to do texts

hey peoples. srry for reopening this thread after a while, but i have a quick question: how do i color SIMPLE output text. i.e if i put into turing:

code:
put "Hi how are you"



how would i color the "Hi how are you" part to be displayed in the color green upon output?
Tony




PostPosted: Tue Jan 03, 2012 12:51 am   Post subject: RE:Turing for Dummies #1 --> How to do texts

color
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Fortes




PostPosted: Fri Dec 07, 2012 8:11 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

Is there a way to make the font bold or italic?
Insectoid




PostPosted: Fri Dec 07, 2012 8:28 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

If I remember correctly, this is only possible via Font.Draw.
lanceahsi02




PostPosted: Thu Feb 04, 2021 2:21 pm   Post subject: RE:Turing for Dummies #1 --> How to do texts

how to print the location of the highest number in the array?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 3  [ 31 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: