DoPicking() protected static method

protected static DoPicking ( Rect rect, UnityEditor.SerializedProperty bodyMask, int count ) : void
rect UnityEngine.Rect
bodyMask UnityEditor.SerializedProperty
count int
return void
Example #1
0
 public static void Show(SerializedProperty bodyMask, int count)
 {
     if (BodyMaskEditor.styles.UnityDude.image)
     {
         Rect rect = GUILayoutUtility.GetRect(BodyMaskEditor.styles.UnityDude, GUIStyle.none, new GUILayoutOption[]
         {
             GUILayout.MaxWidth((float)BodyMaskEditor.styles.UnityDude.image.width)
         });
         rect.x += (GUIView.current.position.width - rect.width) / 2f;
         Color color = GUI.color;
         GUI.color = ((bodyMask.GetArrayElementAtIndex(0).intValue != 1) ? Color.red : Color.green);
         if (BodyMaskEditor.styles.BodyPart[0].image)
         {
             GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[0].image);
         }
         GUI.color = new Color(0.2f, 0.2f, 0.2f, 1f);
         GUI.DrawTexture(rect, BodyMaskEditor.styles.UnityDude.image);
         for (int i = 1; i < count; i++)
         {
             GUI.color = ((bodyMask.GetArrayElementAtIndex(i).intValue != 1) ? Color.red : Color.green);
             if (BodyMaskEditor.styles.BodyPart[i].image)
             {
                 GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[i].image);
             }
         }
         GUI.color = color;
         BodyMaskEditor.DoPicking(rect, bodyMask, count);
     }
 }
        public static void Show(SerializedProperty bodyMask, int count)
        {
            if (!(bool)((Object)BodyMaskEditor.styles.UnityDude.image))
            {
                return;
            }
            Rect rect = GUILayoutUtility.GetRect(BodyMaskEditor.styles.UnityDude, GUIStyle.none, new GUILayoutOption[1] {
                GUILayout.MaxWidth((float)BodyMaskEditor.styles.UnityDude.image.width)
            });

            rect.x += (float)(((double)GUIView.current.position.width - (double)rect.width) / 2.0);
            Color color = GUI.color;

            GUI.color = bodyMask.GetArrayElementAtIndex(0).intValue != 1 ? Color.red : Color.green;
            if ((bool)((Object)BodyMaskEditor.styles.BodyPart[0].image))
            {
                GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[0].image);
            }
            GUI.color = new Color(0.2f, 0.2f, 0.2f, 1f);
            GUI.DrawTexture(rect, BodyMaskEditor.styles.UnityDude.image);
            for (int index = 1; index < count; ++index)
            {
                GUI.color = bodyMask.GetArrayElementAtIndex(index).intValue != 1 ? Color.red : Color.green;
                if ((bool)((Object)BodyMaskEditor.styles.BodyPart[index].image))
                {
                    GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[index].image);
                }
            }
            GUI.color = color;
            BodyMaskEditor.DoPicking(rect, bodyMask, count);
        }
 public static bool[] Show(bool[] bodyPartToggle, int count)
 {
     if (BodyMaskEditor.styles.UnityDude.image)
     {
         Rect rect = GUILayoutUtility.GetRect(BodyMaskEditor.styles.UnityDude, GUIStyle.none, new GUILayoutOption[]
         {
             GUILayout.MaxWidth((float)BodyMaskEditor.styles.UnityDude.image.width)
         });
         rect.x += ((float)Screen.width - rect.width) / 2f;
         Color color = GUI.color;
         if (bodyPartToggle[0])
         {
             GUI.color = Color.green;
         }
         else
         {
             GUI.color = Color.red;
         }
         if (BodyMaskEditor.styles.BodyPart[0].image)
         {
             GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[0].image);
         }
         GUI.color = new Color(0.2f, 0.2f, 0.2f, 1f);
         GUI.DrawTexture(rect, BodyMaskEditor.styles.UnityDude.image);
         for (int i = 1; i < count; i++)
         {
             if (bodyPartToggle[i])
             {
                 GUI.color = Color.green;
             }
             else
             {
                 GUI.color = Color.red;
             }
             if (BodyMaskEditor.styles.BodyPart[i].image)
             {
                 GUI.DrawTexture(rect, BodyMaskEditor.styles.BodyPart[i].image);
             }
         }
         GUI.color = color;
         BodyMaskEditor.DoPicking(rect, bodyPartToggle, count);
     }
     return(bodyPartToggle);
 }