Beispiel #1
0
    void OnGUIPuppetSelectPanel(float width)
    {
        bPuppetToggle = GUILayout.Toggle(bPuppetToggle, "Select Puppet", GUILayout.Height(20));
        if (bPuppetToggle)
        {
            CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
            EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(width));
            GUILayout.Space(30);


            EditorGUILayout.BeginVertical(GUILayout.MaxWidth(width));
            {
                GUI.backgroundColor = Color.cyan;
                int newSelect = GUILayout.SelectionGrid(nPuppetSelect, filesPuppet.ToArray(), 1, GUILayout.MaxWidth(width - 30));
                if (newSelect != nPuppetSelect)
                {
                    onSelectFile(filesPuppet[newSelect]);
                    nPuppetSelect = newSelect;
                }
                GUI.backgroundColor = Color.white;
            }
            EditorGUILayout.EndVertical();

            EditorGUILayout.EndHorizontal();
            CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
        }
    }
Beispiel #2
0
 void OnGUIPuppetAnimSelectPanel(float width)
 {
     if (nPuppetSelect < 0)
     {
         GUILayout.TextArea("Please select puppet first.", GUILayout.MaxWidth(width));
         return;
     }
     bPuppetAnimToggle = GUILayout.Toggle(bPuppetAnimToggle, "Select Puppet Anim", GUILayout.Height(20));
     if (bPuppetAnimToggle)
     {
         CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
         EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(width));
         GUILayout.Space(30);
         EditorGUILayout.BeginVertical(GUILayout.MaxWidth(width));
         {
             GUI.backgroundColor = Color.cyan;
             int newSelect = GUILayout.SelectionGrid(nPuppetAnimSelect, filesPuppetAnim.ToArray(), 1, GUILayout.MaxWidth(width - 30));
             if (newSelect != nPuppetAnimSelect)
             {
                 onSelectAnimFile(filesPuppetAnim[newSelect] + ".PuppetAnim");
                 nPuppetAnimSelect = newSelect;
             }
             GUI.backgroundColor = Color.white;
             foreach (var i in filesPuppetAnimFail)
             {
                 GUILayout.Label(i, GUILayout.MaxWidth(width - 30));
             }
         }
         EditorGUILayout.EndVertical();
         EditorGUILayout.EndHorizontal();
         CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
     }
 }
Beispiel #3
0
 void OnGUIPuppetAnimSelectPanel(float width)
 {
     if (nPuppetSelect < 0)
     {
         GUILayout.TextArea("Please select atlas first.", GUILayout.MaxWidth(width));
         return;
     }
     bAtlasDetailToggle = GUILayout.Toggle(bAtlasDetailToggle, "Atlas detail", GUILayout.Height(20));
     if (bAtlasDetailToggle)
     {
         CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
         EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(width));
         GUILayout.Space(30);
         EditorGUILayout.BeginVertical(GUILayout.MaxWidth(width));
         {
             foreach (var i in spritesAtlasDetail)
             {
                 GUILayout.Label(i, GUILayout.MaxWidth(width - 30));
             }
         }
         EditorGUILayout.EndVertical();
         EditorGUILayout.EndHorizontal();
         CLGCInEditor.Layout_DrawSeparator(new Color(1, 1, 1, 0.25f));
     }
 }
Beispiel #4
0
 void OnGUI()
 {
     GUILayout.BeginHorizontal(GUILayout.Width(this.position.width));
     {
         sviewpos = EditorGUILayout.BeginScrollView(sviewpos, GUILayout.Width(hslider * this.position.width));
         OnGUIPuppetSelectPanel(this.position.width - 30);
         CLGCInEditor.Layout_DrawSeparator(new Color(0, 0, 0, 0.5f));
         OnGUIPuppetAnimSelectPanel(this.position.width - 30);
         EditorGUILayout.EndScrollView();
     }
     CLGCInEditor.Layout_DrawSeparatorV(new Color(0, 0, 0, 0.5f));
     {
         sviewpos2 = EditorGUILayout.BeginScrollView(sviewpos2, GUILayout.Width(hslider * this.position.width));
         OnGUIPlayerPanel(this.position.width);
         EditorGUILayout.EndScrollView();
     }
     GUILayout.EndHorizontal();
 }
Beispiel #5
0
 void OnGUI()
 {
     hslider = GUILayout.HorizontalSlider(hslider, 0.1f, 0.9f, GUILayout.MinWidth(this.position.width), GUILayout.Height(20));
     GUILayout.BeginHorizontal(GUILayout.Width(this.position.width));
     {
         sviewpos = EditorGUILayout.BeginScrollView(sviewpos, GUILayout.Width(hslider * this.position.width));
         OnGUIAtlasSelectPanel(this.position.width - 30);
         CLGCInEditor.Layout_DrawSeparator(new Color(0, 0, 0, 0.5f));
         OnGUIPuppetAnimSelectPanel(this.position.width - 30);
         EditorGUILayout.EndScrollView();
     }
     CLGCInEditor.Layout_DrawSeparatorV(new Color(0, 0, 0, 0.5f));
     {
         var width = this.position.width * (1 - hslider) - 5;
         sviewpos2 = GUILayout.BeginScrollView(sviewpos2, GUILayout.Width(width));
         OnGUIPlayerPanel(width);
         GUILayout.EndScrollView();
     }
     GUILayout.EndHorizontal();
 }