Computer Science Canada Scaling Font Text |
Author: | syntax0r [ Thu May 12, 2005 9:43 pm ] | ||
Post subject: | Scaling Font Text | ||
I'm a little stuck on having a decent intro effect. The fade text in and out tutorial worked, but it destroyed w/e was next in the proceeding code. So, I tried another effect made by myself. In this case, I want a quick explosion of the text growing from small to big quickly. I've tried doing it look so:
But I a crumpled up, black bloch on my screen, that doesnt look like the text at all. |
Author: | Bacchus [ Thu May 12, 2005 9:58 pm ] |
Post subject: | |
your not clearing the area after you put the text, so its writting the new bigger text over the old one making it look like crap. try adding in a cls or just drawing a white box over the previous area |
Author: | syntax0r [ Thu May 12, 2005 10:27 pm ] | ||
Post subject: | |||
Wow, how stupid of me!
Now, the hard is to have it scale from within the center of the text > ![]() Im a little stuck there |
Author: | Bacchus [ Fri May 13, 2005 5:50 am ] | ||
Post subject: | |||
try using Font.Width to help you out. what you do is take the point you want as the middle of the text and subtract the width of the text (using Font.Width) divded by 2 (so subtract half the width). also its easiest to put the cls before the text so you dont have to draw it again. i also took the variable out of the for loop so it wont be declared may times and set the intro text to a variable so you only have to change one thing instead of 2
|
Author: | syntax0r [ Fri May 13, 2005 6:35 am ] |
Post subject: | |
Thanks for the help! I didn't know what the Font.Width statement or View.Update, but i looked those commands up and I understand your code. |
Author: | mercuryy [ Sat May 21, 2005 6:04 pm ] | ||||
Post subject: | |||||
I was thinking is there anyother way other using the "offscreen" command to smooth the animation "welcom" because i wanna do a program like
but if i use offscreen command the loop doesn't work for some reason. this is how i put it
I tried to set the screen again after the "welcome" part of the program but it doesn't seem to work. thanks and sorry for the long code |
Author: | Cervantes [ Sat May 21, 2005 7:14 pm ] |
Post subject: | |
Your problem is you forgot to add a View.Update in the main loop (the one with the buttons). In that loop, you should try to group all your drawing together. You should only have one cls, and only one View.Update. |