Author Topic: Extending UILabel to swap some text into sprites  (Read 3025 times)

milali

  • Guest
Extending UILabel to swap some text into sprites
« on: February 20, 2013, 04:39:20 AM »
Hi, I am looking to swap some text into sprites in a label block.

i.e.

"Sell (2{gem})"

would swap the {gem} text with a sprite named 'gem'

Has anyone done anything like this already? I am about to do it, one thing I was considering was baking the icons into the font texture... but I am not sure that will work as I will have to manually set the UV's for the icons every time we re-export it... but I guess you don't reexport all that often, so....

Has anyone done anything like this before?
« Last Edit: February 20, 2013, 04:42:58 AM by milali »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Extending UILabel to swap some text into sprites
« Reply #1 on: February 20, 2013, 07:11:30 AM »
Symbols. There is a video tutorial on how to do this.

milali

  • Guest
Re: Extending UILabel to swap some text into sprites
« Reply #2 on: February 20, 2013, 07:33:43 AM »
SWEET! I'll check it out now

milali

  • Guest
Re: Extending UILabel to swap some text into sprites
« Reply #3 on: February 21, 2013, 12:04:15 AM »
works perfectly!

love your work bud!