public static ContractContentForm Init() { ContractContentForm editor = (ContractContentForm)GetWindow(typeof(ContractContentForm)); editor.minSize = new Vector2(400, 200); editor.replacementIndex = -1; editor.InternalInit(); editor.Show(); return(editor); }
public static ContractContentForm Init(ContractContent contractContent, int replacementIndex) { ContractContentForm editor = (ContractContentForm)GetWindow(typeof(ContractContentForm)); editor.minSize = new Vector2(400, 200); editor.Tier = contractContent.Tier; editor.Title = contractContent.Title; editor.Description = contractContent.Description; editor.Objectives = contractContent.Objectives.ToList(); editor.replacementIndex = replacementIndex; editor.closeButtonText = "Save"; editor.InternalInit(); editor.Show(); return(editor); }