[Suggestion] SpriteFont Global Character Width

  • It would be helpful to have the "Set character width" action apply globally to the Sprite Font. Whenever I create new text, I have to set the character widths again. I can't think of a case where I wouldn't want it to be a global change.

    Thanks

  • I may be misunderstanding the issue, but you shouldn't have to set the characters widths for each new text within a project. The widths should carry over to each instance of the spritefont. If you're using multiple spritefont objects, and want to set all their character widths, you could add them to a family, and set the character widths of the family.

  • Doesn't seem to work for me. I have one Spritefont object. At the title screen I set the character widths and they appear correctly. When I start playing the game and spawn a new Spritefont instance, I have to set the character widths again.

  • This is where a function will help you. Pass in the UID, pick it, and set your character widths there. Call it on the title screen too.

  • Yeah that should work. But for ease of use, I think the default should just be a global change.

  • Ah, I see what you mean now. It looks like character widths are only saved per layout. A default character width property sounds like a good idea. In the meantime, you could create a event sheet specifically for setting the the character widths, and include it on the other event sheets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Setting the character widths in the 'On created' event should fix it without needing any functions or anything else.

  • Even better. Thanks for the help!

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