Terraria.Ja.GetTooltip2 C# (CSharp) Method

GetTooltip2() public static method

public static GetTooltip2 ( int l ) : string
l int
return string
        public static string GetTooltip2(int l)
        {
            if (language == null) return "";

            // ������擾
            Dictionary<int, string> dic;
            if (language.TryGetValue("tooltip2s", out dic))
            {
                // �e�L�X�g��擾
                var name = "";
                if (dic.TryGetValue(l, out name))
                {
                    return name;
                }
            }
            return "";
        }

Usage Example

Beispiel #1
0
        public static string toolTip2(int l)
        {
            // オリジナルのテキストを取得
            var type       = typeof(Terraria.Lang);
            var method     = type.GetMethod("_toolTip2");
            var str_origin = (string)method.Invoke(null, new object[] { l });

            // XML上のテキストを取得
            var str_ja = Ja.GetTooltip2(l);

            // 空でない方のテキストを返す
            return((str_ja == "") ? str_origin : str_ja);
        }