private void DrawAudioArea() { //Remove request if completed if (request != null && request.status == AsyncRequest.Status.Completed) { request = null; } //Draw pending message or dowload progress bar if (request != null && !request.isDone) { if (request.status != AsyncRequest.Status.Downloading) { GUILayout.Space(4); Utils.DrawPendingLabel("Pending..."); GUILayout.Space(-10); Utils.DrawSeparator(); GUILayout.Space(-5); } else { GUILayout.Space(10); Rect rect = GUILayoutUtility.GetRect(Screen.width, 30); float progress = request.downloadProgress; EditorGUI.ProgressBar(rect, progress, "Download : " + Mathf.RoundToInt(progress * 100) + "%"); } } //Draw Audio preview else if (clip.clip != null) { DrawAudioPlayer(); } //Draw commands GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (request != null) { if (GUILayout.Button("Show pending list")) { Resemble_Window.Open(Resemble_Window.Tab.Pool); } if (clip.clip != null && GUILayout.Button("Select placeholder")) { EditorGUIUtility.PingObject(clip.clip); Selection.activeObject = clip.clip; } } else if (clip.clip != null) { if (GUILayout.Button("Select file")) { EditorGUIUtility.PingObject(clip.clip); Selection.activeObject = clip.clip; } } GUILayout.EndHorizontal(); }
public new void Close() { base.Close(); if (releaseFocusOnclose) { Resemble_Window.Open(); } }