private void OnGUI() { draw = (TextureImporterSetting.show) ? false: true; draw = (Application.isPlaying) ? false: true; if (fType == fTypes.Length - 1) { draw = false; ExportTypesWindow.Init(((BitmapSaverWindow)this)); } Handles.DrawLine(new Vector3(0, 0, 0), new Vector3(10, 0, 0)); Handles.BeginGUI(); AutoEditorResizer(); GUI.enabled = draw; DrawDragLine(new Rect(15, 98, EditorRect.width - 30, EditorRect.height - 190)); DrawDirectory(); DrawFileList(); DrawExporter(); if (TextureImporterSetting.show) { TextureImporterWindow.Init(EditorRect); } Repaint(); ResetStyles(); Handles.EndGUI(); }
public static void Init( BitmapSaverWindow _parent ) { Rect pos = _parent.EditorRect; parent = _parent; if(window != null ) { window.Show(); return; }else{ window =( ExportTypesWindow )EditorWindow.GetWindow(typeof( ExportTypesWindow ), false, "Extension"); window.position = new Rect(pos.x + 150, pos.y + 20, 250, 300); window.wantsMouseMove = true; window.Show(); } }
public static void Init(BitmapSaverWindow _parent) { Rect pos = _parent.EditorRect; parent = _parent; if (window != null) { window.Show(); return; } else { window = ( ExportTypesWindow )EditorWindow.GetWindow(typeof(ExportTypesWindow), false, "Extension"); window.position = new Rect(pos.x + 150, pos.y + 20, 250, 300); window.wantsMouseMove = true; window.Show(); } }
private void Closer() { window.Close(); window = null; }