Example #1
0
    public void EditSpray(ISpray spray)
    {
        Debug.Log("Editing spray as new spray");
        CleanupWipTexture();
        inWIP = true;
        if (currentSpray != spray)
        {
            spray.LoadTexture();
            cameraCapture.LoadImage(spray.Texture);
            spray.UnloadTexture();

            googleAnalytics.LogEvent("Spray", "Edit Spray", spray.Id.ToString(), 1);
        }
        currentSpray = null;
    }
Example #2
0
 public void RestoreWipTexture()
 {
     Debug.Log("Restoring WIP");
     if (currentSpray != null)
     {
         currentSpray.UnloadTexture();
     }
     if (wipTextureBackup != null)
     {
         //Color[] colors = wipTextureBackup.GetPixels();
         cameraCapture.Clear();
         cameraCapture.LoadImage(wipTextureBackup);
     }
     Blank        = wipTextureBlank;
     inWIP        = true;
     currentSpray = null;
 }
Example #3
0
    public void DeleteSpray(ISpray spray)
    {
        Debug.Log("Deleting spray");
        spray.UnloadTexture();
        sprays.Remove(spray);

        PhotoIO.DeleteImage(spray.Id);

        googleAnalytics.LogEvent("Spray", "Delete", spray.Id.ToString(), 1);
        // we need to update the spray ordering so the list view can update
        // for now just update them all, only ones that change will fire a change event
        for (int i = 0; i < sprays.Count; i++)
        {
            sprays[i].Order = i;
        }

        Blank = true;

        if (SprayDeleted != null)
        {
            SprayDeleted(spray);
        }
    }
Example #4
0
    public void PreviewSpray(ISpray spray)
    {
        Debug.Log("Previewing spray");

        if (inWIP == true)
        {
            CleanupWipTexture();
            wipTextureBlank  = Blank;
            wipTextureBackup = cameraCapture.CopyToNewTexture();
            wipTextureBackup.Apply();
        }
        else
        {
            wipTextureBlank = false;
        }
        Blank        = false;
        inWIP        = false;
        currentSpray = spray;
        spray.LoadTexture();
        cameraCapture.LoadImage(spray.Texture);
        spray.UnloadTexture();

        googleAnalytics.LogEvent("Spray", "Preview Spray", spray.Id.ToString(), 1);
    }