Author |
Message |
yetiboy
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
chrisbrown
![](http://compsci.ca/v3/uploads/user_avatars/18814724584bcbb8192aae8.png)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Krocker
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Krocker
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Krocker
|
Posted: Thu Jan 20, 2011 1:05 pm Post subject: RE:Turing for Dummies #1 --> How to do texts |
|
|
k , nvm |
|
|
|
|
![](images/spacer.gif) |
compnerd101
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
Fortes
![](http://compsci.ca/v3/uploads/user_avatars/172783058250c9efad418fa.png)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
lanceahsi02
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
|