コード例 #1
0
    private void _Separate()
    {
        for (int i = 0; i < this.m_StringData.Count; i++)
        {
            this.m_StringData[i].Recycle();
        }
        this.m_StringData.Clear();
        int    num    = 0;
        string text   = (!string.IsNullOrEmpty(this._InputText)) ? this._InputText : string.Empty;
        int    length = text.Length;

        XUILabelSymbol.Type type = XUILabelSymbol.Type.LST_NONE;
        for (int j = 0; j < length; j++)
        {
            if (this._InputText[j] == XUILabelSymbol._EscapedLeftBracket)
            {
                int num2 = this._FindClosingBracket(text, j + 1);
                if (num2 != -1 && num2 - j > 3)
                {
                    int startIndex = j + 1;
                    type = this._GetType(this._InputText, startIndex);
                }
                if (type != XUILabelSymbol.Type.LST_NONE)
                {
                    XUILabelSymbol.StringData data = XDataPool <XUILabelSymbol.StringData> .GetData();

                    data.type = type;
                    if (data.Set(text, j + 4, num2 - j - 4))
                    {
                        if (j > num)
                        {
                            XUILabelSymbol.StringData data2 = XDataPool <XUILabelSymbol.StringData> .GetData();

                            data2.type = XUILabelSymbol.Type.LST_NONE;
                            data2.Set(text, num, j - num);
                            this.m_StringData.Add(data2);
                        }
                        this.m_StringData.Add(data);
                        num = num2 + 1;
                        j   = num2;
                    }
                    else
                    {
                        data.Recycle();
                    }
                    type = XUILabelSymbol.Type.LST_NONE;
                }
            }
        }
        if (num < length)
        {
            XUILabelSymbol.StringData data3 = XDataPool <XUILabelSymbol.StringData> .GetData();

            data3.type = XUILabelSymbol.Type.LST_NONE;
            data3.Set(text, num, length - num);
            this.m_StringData.Add(data3);
        }
    }
コード例 #2
0
 public static bool IsImage(XUILabelSymbol.Type type)
 {
     return(type == XUILabelSymbol.Type.LST_IMAGE);
 }
コード例 #3
0
 protected static string _MakeHyperLinkString(string mainStr, XUILabelSymbol.Type type, string color = "61eee6")
 {
     return(string.Format(" [{0}][u]{1}[/u][-] ", color, mainStr));
 }
コード例 #4
0
 public static bool IsHyperLink(XUILabelSymbol.Type type)
 {
     return(type != XUILabelSymbol.Type.LST_NONE && type != XUILabelSymbol.Type.LST_IMAGE);
 }
コード例 #5
0
 public static bool IsAnimation(XUILabelSymbol.Type type)
 {
     return(type == XUILabelSymbol.Type.LST_ANIMATION);
 }