public void SetThumbnail(Asset_Texture texture) { if (entitytTumbailImg != null) { entitytTumbailImg.enabled = true; entitytTumbailImg.texture = texture.texture; } }
private void OnThumbnailReady(Asset_Texture texture) { // we override the previously stored placeholder image (a referenced asset), we don't destroy it as it // references the asset and it will provoke a "Destroying assets is not permitted to avoid data loss" error thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); finishedLoading = true; }
public void SetThumbnail(Asset_Texture texture) { if (packImg != null) { packImg.enabled = true; packImg.texture = texture.texture; } }
internal void SetThumbnail(Asset_Texture texture) { if (entityThumbnailImg == null) { return; } entityThumbnailImg.enabled = true; entityThumbnailImg.texture = texture.texture; }
public void SetThumbnail(Asset_Texture texture) { if (thumbnailImg != null) { thumbnailImg.enabled = true; thumbnailImg.texture = texture.texture; favImg.gameObject.SetActive(true); } }
private void UpdateItemThumbnail(Asset_Texture texture) { if (thumbnail.sprite != null) { Destroy(thumbnail.sprite); } thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); }
private void OnTextureRetrieved(Asset_Texture assetTexture) { backgroundImage.texture = assetTexture.texture; if (useImageNativeSize) { backgroundImage.SetNativeSize(); } }
public void ThumbnailReady(Asset_Texture texture) { if (thumbnail.sprite != null) { Destroy(thumbnail.sprite); } thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); }
public void SetThumbnail(Asset_Texture texture) { if (!entityPromiseKeeperDict.ContainsKey(texture.id.ToString())) { return; } Sprite spriteToUse = Sprite.Create(texture.texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)); entitySpriteDict.Add(entityPromiseKeeperDict[texture.id.ToString()], spriteToUse); GenerateEntityDropdownContent(); }
private void OnThumbnailReady(Asset_Texture texture) { if (thumbnail.sprite != null) { Destroy(thumbnail.sprite); } thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); AudioScriptableObjects.listItemAppear.Play(true); }
public void SetThumbnailCorrectly() { // Arrange Asset_Texture testTexture = new Asset_Texture(); testTexture.texture = new Texture2D(20, 20); // Act entityInformationController.SetThumbnail(testTexture); // Assert entityInformationController.entityInformationView.Received(1).SetEntityThumbnailEnable(true); entityInformationController.entityInformationView.Received(1).SetEntityThumbnailTexture(testTexture.texture); }
private void OnFaceSnapshotReady(Asset_Texture texture) { if (faceSnapshot != null) { Destroy(faceSnapshot); } if (texture != null) { faceSnapshot = texture.texture; } OnUpdate?.Invoke(this); OnFaceSnapshotReadyEvent?.Invoke(faceSnapshot); }
public void SetThumbnail(Asset_Texture texture) { if (thumbnailImg != null) { thumbnailImg.enabled = true; thumbnailImg.texture = texture.texture; favImg.gameObject.SetActive(true); if (gameObject.activeInHierarchy && ItemAdapterIsOnScreen()) { AudioScriptableObjects.listItemAppear.Play(); } } SetLoadingActive(false); }
private void OnThumbnailReady(Asset_Texture texture) { if (thumbnail.sprite != null) { Destroy(thumbnail.sprite); } thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); if (view != null) { if (view.avatarEditorCanvas.enabled) { AudioScriptableObjects.listItemAppear.Play(true); } } }
private void OnThumbnailReady(Asset_Texture texture) { loadingAnimator.SetTrigger(LOADING_ANIMATOR_TRIGGER_LOADED); if (thumbnail.sprite != null) { Destroy(thumbnail.sprite); } thumbnail.sprite = ThumbnailsManager.CreateSpriteFromTexture(texture.texture); if (view != null) { if (view.avatarEditorCanvas.enabled) { AudioScriptableObjects.listItemAppear.Play(true); } } }
public void SceneObjectDroppedFromQuickBarCorrectly() { // Arrange Asset_Texture testTexture = new Asset_Texture(); CatalogItem testCatalogItem = new CatalogItem { }; int testFromIndex = 0; int testToIndex = 1; quickBarController.quickBarShortcutsCatalogItems = new CatalogItem[2]; quickBarController.quickBarShortcutsCatalogItems[0] = testCatalogItem; quickBarController.quickBarShortcutsCatalogItems[1] = null; // Act quickBarController.SceneObjectDroppedFromQuickBar(testFromIndex, testToIndex, testTexture.texture); // Assert Assert.AreEqual(testCatalogItem, quickBarController.quickBarShortcutsCatalogItems[1], "The CatalogItem 1 does not match!"); quickBarController.quickBarView.Received(1).SetTextureToShortcut(testToIndex, testTexture.texture); Assert.IsNull(quickBarController.quickBarShortcutsCatalogItems[testFromIndex], "The CatalogItem 0 is not null!"); quickBarController.quickBarView.Received(1).SetShortcutAsEmpty(testFromIndex); }
public void SceneObjectDroppedFromCatalogCorrectly(int objectIndex) { // Arrange quickBarController.lastIndexDroped = objectIndex; quickBarController.quickBarShortcutsCatalogItems = new CatalogItem[3]; quickBarController.quickBarShortcutsCatalogItems[0] = new CatalogItem { }; quickBarController.quickBarShortcutsCatalogItems[1] = new CatalogItem { }; quickBarController.quickBarShortcutsCatalogItems[2] = new CatalogItem { }; string testCatalogItemId = "testId"; CatalogItemAdapter testCatalogAdapter = new GameObject("_CatalogItemAdapter").AddComponent <CatalogItemAdapter>(); testCatalogAdapter.smartItemGO = new GameObject("_SmartItemGO"); testCatalogAdapter.lockedGO = new GameObject("_LockedGO"); testCatalogAdapter.SetContent(new CatalogItem { id = testCatalogItemId }); Asset_Texture testTexture = new Asset_Texture(); testCatalogAdapter.thumbnailImg = new GameObject("_RawImage").AddComponent <RawImage>(); testCatalogAdapter.thumbnailImg.texture = testTexture.texture; testCatalogAdapter.thumbnailImg.enabled = true; quickBarController.sceneCatalogController.GetLastCatalogItemDragged().ReturnsForAnyArgs(testCatalogAdapter); // Act quickBarController.SceneObjectDroppedFromCatalog(null); // Assert quickBarController.sceneCatalogController.Received(1).GetLastCatalogItemDragged(); Assert.AreEqual(testCatalogItemId, quickBarController.quickBarShortcutsCatalogItems[objectIndex].id); quickBarController.quickBarView.Received(1).SetTextureToShortcut(objectIndex, testTexture.texture); }
private void OnIconReady(Asset_Texture assetTexture) { iconImage.texture = assetTexture.texture; }
private void OnImageReady(Asset_Texture assetTexture) { rewardImage.texture = assetTexture.texture; }
public void SetThumbnail(Asset_Texture texture) { //TODO: Implement the Image of the entity for the dropdown }
private void OnThumbnailReady(Asset_Texture assetTexture) { thumbnailImage.texture = assetTexture.texture; }
internal void SetThumbnail(Asset_Texture texture) { entityInformationView.SetEntityThumbnailEnable(true); entityInformationView.SetEntityThumbnailTexture(texture.texture); }
private void OnThumbnailReady(Asset_Texture assetTexture) { thumbnailImage.gameObject.SetActive(true); thumbnailImage.texture = assetTexture.texture; }
private void OnThumbnailReady(Asset_Texture assetTexture) { thumbnailImage.gameObject.SetActive(true); thumbnailImage.texture = assetTexture.texture; animator.SetTrigger(LOADED_ANIM_TRIGGER); }
private void OnThumbnailReady(Asset_Texture assetTexture) { thumbnailImage.texture = assetTexture.texture; animator.SetTrigger(LOADED_ANIM_TRIGGER); }