/// <summary> /// Deletes the sticker. /// </summary> void DeleteSticker(UStep tmp) { // Debug.Log("DeleteStickerUndo"); // Destroy(tmp.sticker); tmp.sticker.SetActive(false); StickersController.SelectSticker(null); }
public void OnPointerDown(PointerEventData eventData) { if (eventData.pointerId > 0) { return; } StickersController.SelectSticker(this.gameObject); // Debug.Log("Current Sticker: " +StickersController.currentSticker.name); }
public void StickersButton() { colorsAndBrushes.Play("HideColorsAndBrushes"); stickers.Play("ShowStickers"); StickerMode = true; paintEngine.drawEnabled = false; SetStickersDragEnabled(true); if (stickersHolder.childCount >= 1) { StickersController.SelectSticker(stickersHolder.GetChild(stickersHolder.childCount - 1).gameObject); } MarkCurrentDrawMode(0); }
/// <summary> /// Instantiates the sticker. /// </summary> void InstantiateSticker(UStep tmp) { // Debug.Log("InstantiateStickerUndo"); // GameObject clone = (GameObject) Instantiate (stickerPrefab,Vector3.zero,Quaternion.identity); // clone.transform.SetParent(stickersHolder); // clone.transform.localScale = tmp.stickerScale; // clone.transform.localPosition = tmp.stickerLocalPos; // clone.transform.localRotation = tmp.stickerRotation; // Sprite s = stickerButtonsHolder.GetChild(tmp.stickerDeleted).GetComponent<Image>().sprite; // clone.GetComponent<Image>().sprite = s; // StickersController.SelectSticker(clone); tmp.sticker.SetActive(true); StickersController.SelectSticker(tmp.sticker); }
public void DeleteButton() { GameObject.Find("PaintSetUpManager").GetComponent <PaintSetUp>().SetUpQuadPaint(); GameObject.Find("Canvas/Paint/PaintPanel").GetComponent <AdvancedMobilePaint.PaintUndoManager>().ClearSteps(); for (int i = 0; i < stickersHolder.childCount; i++) { Destroy(stickersHolder.GetChild(i).gameObject); } StickersController.SelectSticker(null); if (StickerMode) { paintEngine.drawEnabled = false; } }
public void FloodFillButton() { brushControlls.alpha = 0; brushBitmaps.alpha = 0; brushControlls.interactable = false; brushBitmaps.interactable = false; if (StickerMode) { stickers.Play("HideStickers"); colorsAndBrushes.Play("ShowColorsAndBrushes"); StickerMode = false; // paintEngine.drawEnabled = true; SetStickersDragEnabled(false); StickersController.SelectSticker(null); } MarkCurrentDrawMode(1); }