블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2794)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (11)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

NGUI UILabel BBCode

Unity3D/NGUI / 2014. 12. 31. 14:15

The use of Unity3d NGUI (two) (UILabel Chinese font and click on the font)

Unity3d NGUI can create font can click effect, click on the open web links

There are Chinese font display, can direct call system built-in fonts, does not need the third party font support


UILabel (Script parameters)


The first font options, NGUI is using a static font, when we need to show Chinese, it is best to use dynamic fonts, or you can create static font set

Font Size: font size

Material: The font textures, such as the need for font color

Text: Display content

Overflow: Filler content options, 1, ShrinkContent (content based filling) 2, ClampContent (in the font for the base shear)

3, ResizeFreely (content as the base level for filling) 4, with content high as reference for filling

Alignment: Alignment, font

Keep crisp: Dynamic font sharpening

Gradient: Font change

Effect: The fonts

Spaceing: Font spacing

Max Lines: The number of rows to display font

BBCode: Use the NGUI custom formatting font font


1, Create Chinese font

A. first creates a UILabel in Widget Tool

B. in the NGUI inspector window, select Unity UILabel, then select Font-Arial

C. We are now using dynamic fonts, can display Chinese


2, Create a link font

A. need to add the click event UILabel add a Script

	void OnClick ()
	{
		UILabel lbl = GetComponent<UILabel>();
		
		if (lbl != null)
		{
			string url = lbl.GetUrlAtPosition(UICamera.lastHit.point);
			if (!string.IsNullOrEmpty(url)) Application.OpenURL(url);
		}
	}

The B. for the current UILabel add a Box Collider, adjust the Box Collider size for the current UILabel window size 

The Is Trigger option is on the hook


C. NGUI currently supports formatting font three, 1 ([b]bold[/b] display effect dynamic font changes) 2 ([u]underline[/u] underline

[s]strikethrough[/s] Delete line) 3 ([url=http://www.tasharen.com/][u]clickable hyperlinks[/u][/url] add a web link)


Show all formatting, click clickable to open the link



The use of Unity3d NGUI (two) (UILabel Chinese font and click on the font)


출처 : http://www.programering.com/a/MTO2gDNwATU.html

반응형

'Unity3D > NGUI' 카테고리의 다른 글

Coloring individual characters in an NGUI UILabel text  (0) 2014.12.31
NGUI UILabel Reference  (0) 2014.12.31
PSD Layers to PNG Files(PSD2PNGs)  (0) 2014.12.31
PSD Layers to 2D Tool Kit(PSD2TK2D)  (0) 2014.12.31
PSD Layers to NGUI(PSD2NGUI)  (0) 2014.12.31
Posted by blueasa
, |