Ejemplo n.º 1
0
    public static ContractForm Init()
    {
        ContractForm editor = (ContractForm)GetWindow(typeof(ContractForm));

        editor.minSize          = new Vector2(400, 600);
        editor.replacementIndex = -1;
        editor.InternalInit();
        editor.Show();

        return(editor);
    }
Ejemplo n.º 2
0
    public static ContractForm Init(ContractModel existingContract, int replacementIndex)
    {
        ContractForm editor = (ContractForm)GetWindow(typeof(ContractForm));

        editor.minSize = new Vector2(400, 600);
        editor.InternalInit();
        editor.Show();

        editor.Tier                = existingContract.Tier;
        editor.Title               = existingContract.Title;
        editor.TargetName          = existingContract.TargetName;
        editor.Description         = existingContract.Description;
        editor.TargetImagePath     = existingContract.TargetImagePath;
        editor.TargetShipImagePath = existingContract.TargetShipImagePath;
        editor.Objectives          = existingContract.Objectives.ToList();

        editor.replacementIndex = -1;
        editor.closeButtonText  = "Save";

        return(editor);
    }