public void SetMovie(SearchedMovie movie) { this.movie = movie; title.text = this.movie.title; releaseDate.text = this.movie.releaseDate; slider.value = (float)(movie.voteAverage / 10f); votes.text = $"{ExtenstionMethods.FormatNumber(movie.votesCount)} reviews"; TextureBase.Instance.AddToQueue(movie.imageUrl, image); }
private async void SetUI() { title.text = Movie.Title; relaseDate.text = Movie.ReleaseDate; votes.text = "Votes: " + ExtenstionMethods.FormatNumber(Movie.VotesCount); slider.value = (float)(Movie.VoteAverage / 10f); if (gameObject.activeInHierarchy) { TextureBase.Instance.AddToQueue(Movie.ImageUrl, image); } else { Debug.Log("activeInHierarchy: false"); imageIsNotSet = true; } }
public void LoadMovieDetails(SavedMovieItem savedMovieItem) { var movie = savedMovieItem.Movie; SavedMovieItem = savedMovieItem; gameObject.SetActive(true); TextureBase.Instance.AddToQueue(movie.ImageUrl, image); TextureBase.Instance.AddToQueue(movie.BackdropUrl, backdropImage); starBar.value = (float)(movie.VoteAverage / 10f); votes.text = votes.text = $"{ExtenstionMethods.FormatNumber(movie.VotesCount)} reviews"; titleTextField.text = movie.Title; releaseDateTextField.text = movie.ReleaseDate; authorTextField.text = movie.Author; descriptionTextField.text = movie.Description; noteTextField.text = movie.Note; }