Author Topic: Label text wrapping  (Read 2088 times)

SJones

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Label text wrapping
« on: January 02, 2015, 12:33:06 PM »
Hi, I am in need of adding extra functionality to labels, I am currently using ngui 2.7.0 due to still working in unity 3.5 so cant upgrade to the latest version of ngui.

My goal is to have an offset on specific lines of the uiLabel, e.g.
Line 1
    Line 2
        Line 3
    Line 4
Line 5

I also require them to conform to the line width (so the indent doesnt effect the amount of text on the line) my coding skills are not that great but taking a look at the UIlabel script it looks like any modifications made would be around the following
  1. else if (mMaxLineWidth > 0 || mMaxLineHeight > 0)
  2.                                 {
  3.                                         fits = mFont.WrapText(mText, out mProcessedText, mMaxLineWidth / scale, mMaxLineHeight / scale,
  4.                                                 mMaxLineCount, mEncoding, mSymbols);
  5.                                 }

Any help would be great, thanks