三国卡牌客户端基础资源仓库
yyl
3 天以前 cec146fc3fe287928e075c79ece20a20a9b16b20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using UnityEditor;
using UnityEngine;
 
[CustomEditor(typeof(TextEx),true),CanEditMultipleObjects]
public class TextExEditor:UnityEditor.UI.TextEditor {
 
    public override void OnInspectorGUI() {
        base.OnInspectorGUI();
        EditorGUILayout.Space();        
        TextEx text = target as TextEx;
        text.isKey = EditorGUILayout.Toggle("是语言表ID",text.isKey);
        text.keyName = EditorGUILayout.TextField(text.keyName, GUILayout.Width(200));
        text.colorType = (TextColType)EditorGUILayout.EnumPopup("颜色类型", text.colorType);
        text.bgColorType = (TextEx.BackGroundColorType)EditorGUILayout.EnumPopup("背景颜色类型", text.bgColorType);
    }
 
}