Author Topic: UI Popup Menu Sprite elements  (Read 5382 times)

singh029

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 28
    • View Profile
UI Popup Menu Sprite elements
« on: January 23, 2014, 02:39:47 AM »
Is it possible to put sprite images next to an element in the UI Popup Menu? It seems like it only allows for text (labels).

Thanks!

Cripple

  • TNP Alpha
  • Full Member
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #1 on: January 23, 2014, 03:28:07 AM »
You can use emoticons to encode images in your label.
Graphicstream Dev.

singh029

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #2 on: January 25, 2014, 06:16:10 PM »
How do I insert an emoticon into a TTF? or how do i convert a TTF to an FNT(Bitmap Font)

I cant find any converter that converts Krungthep.TTF to an FNT

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #3 on: January 25, 2014, 06:34:56 PM »
You can't have emoticons in dynamic fonts (yet). Only bitmap fonts that have been added to an atlas can pull other sprites from that atlas as emoticons.

singh029

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #4 on: March 24, 2014, 03:58:47 AM »
Is there support to add emoticons to dynamic fonts yet?
If not, is there an updated video on how to add emoticons to a bitmap font (font maker tool used to create dynamic to bitmap font)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #5 on: March 24, 2014, 04:15:10 PM »
Dynamic fonts are too problematic for me to consider using them seriously. Too many issues on Unity's side. I've been improving bitmap fonts instead for that reason. So no, no emoticons in dynamic fonts.

To add an emoticon to a bitmap font, just select the font prefab and follow the instructions there. Enter the emoticon sequence such as "^_^" and choose the appropriate sprite. Hit the Add button, and you're done.

singh029

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #6 on: March 26, 2014, 05:45:31 PM »
Well i got the emoticons to appear. but now the text gets all jumbled up and weird.
I cant get the text to appear when theres an emoticon in the font file.

any ideas?

I converted dynamic font to bitmap font and added an atlas that contained just the emoticon size 20x20. i then added the emoticon "<>".
when i tried using it along with text, it gives some funky results.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Popup Menu Sprite elements
« Reply #7 on: March 26, 2014, 08:15:35 PM »
The atlas is supposed to contain your font as well as the emoticons. Try it with the Arimo20 font to get a hang of it. Choose a sprite, choose a sequence, hit Add. Then create a label using Arimo20 font and print the sequence.