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; }
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; }
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); } }
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); }