Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Display only a part of a string  (Read 4383 times)

0 Members and 1 Guest are viewing this topic.

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Display only a part of a string
« on: December 20, 2008, 03:00:02 pm »
Hi, is it possible to for example display only the first 200 pixels of a string of length say 250 pixels (or any length > 200 :))?

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Display only a part of a string
« Reply #1 on: December 20, 2008, 06:32:34 pm »
ok thanks. I would have needed to be able to display parts of letters. I guess I can fool the eyes though.

irri

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://www.irri.se
Display only a part of a string
« Reply #2 on: December 20, 2008, 08:02:03 pm »
Hi!
What if you want to have a dialogue box where the text appears letter by letter, or fade in.
Which is the best way to accomplish that?
2D RPG Game (School project): http://PA.irri.se/

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Display only a part of a string
« Reply #3 on: January 07, 2009, 07:35:58 pm »
Is there no hack that can be done? For example convert the rendered text to an image? so that the sprite method SetSubRect() can be used later.

coral

  • Newbie
  • *
  • Posts: 37
    • View Profile
Display only a part of a string
« Reply #4 on: January 07, 2009, 08:17:55 pm »
You can of course make a lot of ugly hacks to solve this problem.

One simple i can think of, not very general but at least a cheap solution is to draw a color in a PNG (or fileformat with support for alpha channel) and make a gradient with Your color to transparent, then just move this over the text corresponding to what you want to fade in.

WOILA INSTANT FADE!

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Display only a part of a string
« Reply #5 on: January 07, 2009, 10:22:08 pm »
I don't quite understand what you mean.