Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        UIToggle uitoggle = target as UIToggle;

        EditorTools.DrawUpdateKeyTextField(uitoggle);

        base.OnInspectorGUI();

        if (EditorTools.DrawHeader("逻辑绑定", false, false))
        {
            this.serializedObject.Update();
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(this.m_UEValueTrue, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_UEValueFalse, new GUILayoutOption[0]);
            if (EditorGUI.EndChangeCheck())
            {
                this.serializedObject.ApplyModifiedProperties();
            }
            GUILayout.Space(10);
        }

        if (EditorTools.DrawHeader("事件/参数", false, false))
        {
            UIEditroCommon.DrawUIEventClickable(uitoggle, uitoggle.eventClicker);
        }
    }
Exemplo n.º 2
0
    public void drawSprite(UIButton uibutton)
    {
        if (EditorTools.DrawHeader("事件/参数", false, false))
        {
            GUILayout.Space(3);
            bool UseIngoreRaycastOnClick = EditorGUILayout.Toggle("点击时使用射线穿透", uibutton.ingoreMask);
            UIEditroCommon.DrawUIEventClickable(uibutton, uibutton.eventClicker);

            if (GUI.changed)
            {
                EditorTools.RegisterUndo("UIButton", uibutton);
                uibutton.ingoreMask = UseIngoreRaycastOnClick;
                EditorTools.SetDirty(uibutton);
            }
        }
    }