close

using UnityEngine;
using System.Collections.Generic;
using System;

[ExecuteInEditMode]
[AddComponentMenu("NGUI/UI/NGUI Chat Label")]
public class ChatLabel : UIWidget
{
    //Bitmap UIFont
    public UIFont mFont;

    //Bitmap Material
    public override Material material
    {
        get
        {
            return mFont.material;
        }
    }

    //Bitmap UIFont
    public UIFont bitmapFont
    {
        get
        {
            return mFont;
        }
    }
    
    //显示的内容
    public string processedText
    {
        get
        {
            Debug.Log("ProcessedText..!");
            NGUIText.bitmapFont = mFont;
            NGUIText.alignment = TextAlignment.Right;
            NGUIText.lineWidth = 260;
            NGUIText.lineHeight = 76;

            return "ProcessedText..!!.!111";
        }
    }

    public override void OnFill(BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols)
    {
        Debug.Log("OnFill....");
        //颜色设置
        NGUIText.tint = Color.green;
        NGUIText.Print(processedText, verts, uvs, cols);
    }
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 gundamhina 的頭像
    gundamhina

    gundamhina的部落格

    gundamhina 發表在 痞客邦 留言(0) 人氣()