protected override void OnCreateForm(Form form) { form.Spacing = 5; form.Add(new Headline("Create Subfolders")); Linear lyButton = Linear.Horizontal(); Button button = new Button("Ok", ButtonClicked); button.Width = 100; lyButton.Add(new View()).Add(button); Label lblSubfolders = new Label("Subfolders:"); lblSubfolders.Width = 150; EMP.Forms.Grid lyCheckboxes = new EMP.Forms.Grid(3, EMP.Forms.Grid.EOrientation.Vertical); foreach (string folder in new string[] { "Scripts", "Scenes", "Prefabs", "Resources", "Textures", "Materials", "Meshes", "Editor" }) { Toggle toggle = new Toggle(false, folder); subfolders.Add(toggle); lyCheckboxes.Add(toggle); } form.Add(lyCheckboxes); form.Add(new View()); form.Add(lyButton); }
protected override void OnCreateForm(Form form) { form.Spacing = 5; form.Add(new Headline("Create Folder")); //Label lblNamespace = new Label("Namespace:"); //lblNamespace.Width = 150; //txtNamespace = new TextField(transitiveSourceInfo.@namespace); //Linear lyNamespace = Linear.Horizontal().Add(lblNamespace).Add(txtNamespace); //lyNamespace.Height = 30; Label lblFolder = new Label("Folder:"); lblFolder.Width = 150; txtFolderName = new TextField(); Linear lyFolder = Linear.Horizontal().Add(lblFolder).Add(txtFolderName); lyFolder.Height = 30; lblError = new Label(""); lblError.style.fontStyle = FontStyle.Bold; Linear lyButton = Linear.Horizontal(); Button button = new Button("Ok", ButtonClicked); button.Width = 100; lyButton.Add(new View()).Add(button); Label lblSubfolders = new Label("Create subfolders:"); lblSubfolders.Width = 150; EMP.Forms.Grid lyCheckboxes = new EMP.Forms.Grid(3, EMP.Forms.Grid.EOrientation.Vertical); foreach (string folder in new string[] { "Scripts", "Scenes", "Prefabs", "Resources", "Textures", "Materials", "Meshes", "Editor" }) { Toggle toggle = new Toggle(false, folder); subfolders.Add(toggle); lyCheckboxes.Add(toggle); } Linear lySubfolders = Linear.Horizontal().Add(lblSubfolders).Add(lyCheckboxes); //form.Add(lyNamespace); form.Add(lyFolder); form.Add(lblError); form.Add(lySubfolders); form.Add(lyButton); form.RequestFocusForView = txtFolderName; }