Author Topic: Symbols vertical alight  (Read 1743 times)

lzt120

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 68
    • View Profile
Symbols vertical alight
« on: June 10, 2014, 09:45:41 PM »
There lack of the Alignment of vertical for Symbols which will result in incorrect looks when the symbols do not has the same size! Please refer to picture for reference.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Symbols vertical alight
« Reply #1 on: June 11, 2014, 05:38:16 AM »
The "Padding" setting is what controls it.

Wisteso

  • Full Member
  • ***
  • Thank You
  • -Given: 21
  • -Receive: 3
  • Posts: 103
    • View Profile
Re: Symbols vertical alight
« Reply #2 on: July 19, 2016, 02:42:12 PM »
@ArenMook

While padding does fix any vertical alignment issues, it's also making the backing sprite unusable for cases where it is also used within a normal UISprite.

For example, I have to add -12 to the top-padding of a larger sprite in order for it to align correctly (as an emoticon/symbol) with the rest of some text.  However, if I want to then use that same sprite in a UISprite (not as an emoticon), the top edge is now 12 pixels distended on top.

It seems the only solution is to always use UILabel (and not UISprite) to display that specific sprite, after the padding has been altered for an emoticon.
« Last Edit: July 19, 2016, 02:48:53 PM by Wisteso »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Symbols vertical alight
« Reply #3 on: July 20, 2016, 03:28:48 AM »
Well, of course. Emoticons are small sprites meant to be displayed by labels for the purpose of being able to keep the same one draw call while doing so. If you then try to display the same sprites as regular sprites, you may run into alignment issues if you've modified the padding. Also keep in mind that the sprites you use as emoticons should be sized to match the font's size already.