[Suggestion] SpriteFont Y Offset

0 favourites
  • 8 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hello,

    I think it would be great to add an Y offset to each printed character of the offical sprite font plugin. It would simply display characters from the charmap starting this offset. One application would be to support different colors by just adding the same charmap with a different color below the original one and changing the offset.

    What do you think ?

  • This is actually a pretty good idea!

    +1

  • Sorry to bump, but I've been looking into this and haven't found a good way to do it..

    Anyone know how can I achieve something like this? It would be pretty cool if I could use something like

    "This is a [red]test[/red]"

    or maybe

    "This is a"&spritefont.offset+value"test"

    I haven't looked into it enough but any clues as how to achieve that would be deeply appreciated!

  • One method ive been using for text shadows is making a duplicate of it, then manually setting the offset and color

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • andreyin That would be cool, did you find a solution?

  • Sorry to bump, but I've been looking into this and haven't found a good way to do it..

    Anyone know how can I achieve something like this? It would be pretty cool if I could use something like

    "This is a [red]test[/red]"

    or maybe

    "This is a"&spritefont.offset+value"test"

    I haven't looked into it enough but any clues as how to achieve that would be deeply appreciated!

    Don't know how Spritefont works from rendering side. But having multiple frames/animations (like in sprite) where each frame/animation could be a different color texture could be a solution.

    And doing something like this "This is a [red]test[/red]" will simply mix "letter parts" of these frames/animations as needed.

  • I haven't! ):

    The current SpriteFont object won't allow you to change the Y offset..

    It's probably doable though if you have 2 SpriteFont objects one on top of the other, then somehow only showing the colored letters on one of them. Not sure how to achieve that though.

  • I don't think that would work too well, unless the image has no transparent parts.

    An example of what colored Spritefont text could be like:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)