Ejemplo n.º 1
0
 bool IsReferencedInChains(DialogRequirement br)
 {
     foreach (var dl in SourceCollection.Dialogs)
     {
         var chain = new List<Dialog>();
         chain = GetAllDialogsInChain(chain, dl);
         foreach (var chainDialog in chain)
         {
             if (chainDialog.Requirements.Contains(br))
             {
                 return true;
             }
         }
     }
     return false;
 }
Ejemplo n.º 2
0
 bool DrawInlineRequirement(DialogRequirement dr)
 {
     var ret = true;
     GUILayout.BeginVertical(EditorStyles.textArea);
     GUILayout.BeginHorizontal();
     GUILayout.Label(dr.CachedName, EditorStyles.helpBox);
     if (GUILayout.Button("x", EditorStyles.miniButton, GUILayout.Width(16)))
     {
         ret = false;
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(2);
     if (!dr.DrawComplexGui())
     {
         var so = new SerializedObject(dr);
         var sp = so.GetIterator();
         sp.NextVisible(true);
         while (sp.NextVisible(true))
         {
             GUILayout.BeginHorizontal();
             GUILayout.Label(sp.name, GUILayout.ExpandWidth(true));
             EditorGUILayout.PropertyField(sp, GUIContent.none);
             GUILayout.EndHorizontal();
         }
     }
     GUILayout.EndVertical();
     return ret;
 }