Author Topic: UILabel  (Read 178850 times)

qq33357486

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UILabel
« Reply #75 on: May 06, 2014, 11:06:37 PM »
UILabel.ambigiousFont = yourFont;

But I want to change only one label.
some label has other font

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #76 on: May 08, 2014, 03:18:20 AM »
so... do just that? I don't understand the issue. Here's the full code, in case it's not clear:
  1. GetComponent<UILabel>().ambigiousFont = yourFont;

Kamo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UILabel
« Reply #77 on: May 15, 2014, 09:14:33 AM »
I have a suggestion value for overflow:
ClampContent with the "..." replacing the last characters at the end of the visible text

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: UILabel
« Reply #78 on: June 03, 2014, 09:27:14 AM »
I have ui label of emotion icon tag [xp] that work on 3.5.x, but it doesn't work for 3.6.2.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #79 on: June 04, 2014, 02:04:33 AM »
Nothing has changed in regards to emoticons in the past few months that I can think of. The emoticons that are a part of the Arimo20 font that comes with NGUI still work, for example. How can I reproduce the issue on my end?

Nick_Field

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: UILabel
« Reply #80 on: June 06, 2014, 05:01:15 AM »
Emoticons for UILabels with dynamic fonts, I know that isn't possible now (Emoticons == static font icons or user sprites). But Do you plan implement this feature in updates in near future?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #81 on: June 06, 2014, 10:03:06 PM »
Not until Unity fixes issues with dynamic fonts.

skullthug

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: UILabel
« Reply #82 on: June 12, 2014, 02:28:47 PM »
Unfortunately converting my font to non-dynamic is out the question in this project. But is there a clever (or ugly) way to work around this?

Basically I just want to replace the [X] in:
[X] OPEN
with a button graphic.

The string changes so unfortunately [X] is never in the same position. Is there a way to brute force this by detecting [X]'s position and moving a UISprite to cover it or something?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #83 on: June 13, 2014, 06:16:48 AM »
Not easily, no.

skullthug

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: UILabel
« Reply #84 on: June 14, 2014, 12:06:51 PM »
I don't expect it to be easy  ;D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #85 on: June 15, 2014, 06:15:17 AM »
NGUIText.PrintCharacterPositions can be used to determine the positions of all characters. You can use it to position your sprite. Just don't forget to call label.UpdateNGUIText() prior to calling that function.

Fractalbase

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: UILabel
« Reply #86 on: June 17, 2014, 06:37:33 PM »
Is there a way to set vertical alignment?  I've implemented a work-around where the text variable has several '\n' characters inserted, but I'd prefer a better solution.

xLeo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: UILabel
« Reply #87 on: June 18, 2014, 09:18:27 AM »
Is it possible or is it planned be implemented a way to use bbcode syntax to define effects (outline/shadow) and/or effect colors for a portion of the text?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel
« Reply #88 on: June 18, 2014, 08:23:17 PM »
@Fractalbase: Yes, change the pivot to top or bottom. Bottom-left, Top-right, etc will also work.

@xLeo: No, no plans for that right now.

Fractalbase

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: UILabel
« Reply #89 on: June 21, 2014, 06:47:01 AM »
Are you sure regarding changing the pivot?  I've altered the pivot to be top, then bottom, but the text is always aligned at the center (vertically).