Beispiel #1
0
        /// <summary> Draw an asset and its children. </summary>
        private void DrawVoice(Voice voice)
        {
            //Apply search filter
            if (!string.IsNullOrEmpty(search) && !voice.name.Contains(search))
            {
                return;
            }

            //Draw button
            if (GUILayout.Button(voice.name))
            {
                callback.Invoke(voice);
                Close();
            }
        }
        /// <summary> Draw an asset and its children. </summary>
        private void DrawClip(ResembleClip clip)
        {
            //Apply search filter
            if (!string.IsNullOrEmpty(search) && !clip.title.Contains(search))
            {
                return;
            }

            //Draw button
            if (GUILayout.Button(clip.title))
            {
                callback.Invoke(clip);
                Hide();
            }
        }
 private void DrawContent()
 {
     value = GUILayout.TextField(value);
     GUILayout.BeginHorizontal();
     GUILayout.FlexibleSpace();
     if (GUILayout.Button("Cancel"))
     {
         Close();
     }
     if (GUILayout.Button("Confirm"))
     {
         callback.Invoke(value);
         Close();
     }
     GUILayout.EndHorizontal();
 }
 private void DrawContent()
 {
     selected        = EditorGUILayout.Popup(selected, choices);
     deleteAudioClip = EditorGUILayout.Toggle("Delete generated file", deleteAudioClip);
     GUILayout.BeginHorizontal();
     GUILayout.FlexibleSpace();
     if (GUILayout.Button("Cancel"))
     {
         Close();
     }
     if (GUILayout.Button("Confirm"))
     {
         callback.Invoke(selected == 1, deleteAudioClip);
         Close();
     }
     GUILayout.EndHorizontal();
 }
        private void DrawFooter()
        {
            Rect rect = GUILayoutUtility.GetRect(Screen.width, 1);

            EditorGUI.DrawRect(rect, Color.black * 0.8f);

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Cancel"))
            {
                Close();
            }
            if (GUILayout.Button("Import"))
            {
                callback.Invoke(assets);
                Close();
            }
            GUILayout.EndHorizontal();
        }