Example #1
0
 private void SetVisibilityForChildren(AQNode asset, bool v)
 {
     if (!displayChildren.ContainsKey(asset))
     {
         displayChildren.Add(asset, v);
     }
     else
     {
         displayChildren[asset] = v;
     }
 }
Example #2
0
    private void RecursiveShowAsset(AQNode asset)
    {
        if (curRecursiveDepth >= maxRecursiveDepth)
        {
            return;
        }
        curRecursiveDepth++;
        if (asset == null)
        {
            EditorGUILayout.LabelField("No value.");
            curRecursiveDepth--;
            return;
        }
        EditorGUILayout.BeginHorizontal();

        EditorGUILayout.BeginVertical();

        EditorGUILayout.LabelField(asset.name);
        EditorGUILayout.ObjectField(asset, asset.GetType(), false);
        if (GUILayout.Button(asset.name))
        {
            SetVisibilityForChildren(asset, true);
        }

        EditorGUILayout.EndVertical();

        // show list of children
        AQListNode      listAsset = asset as AQListNode;
        AQDecoratorNode decAsset  = asset as AQDecoratorNode;

        if (listAsset != null || decAsset != null)
        {
            EditorGUILayout.BeginVertical();

            if (listAsset != null)
            {
                for (int i = 0; i < listAsset.conditions.Length; i++)
                {
                    RecursiveShowAsset(listAsset.conditions[i]);
                }
            }
            else if (decAsset != null)
            {
                RecursiveShowAsset(decAsset.child);
            }

            EditorGUILayout.EndVertical();
        }

        EditorGUILayout.EndHorizontal();
        curRecursiveDepth--;
    }
Example #3
0
 internal static void Show(AQNode asset)
 {
 }