37 lines
1012 B
C#
37 lines
1012 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.Menu;
|
|
using Ichni.Story;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Ichni.UI
|
|
{
|
|
public class ChapterSelectionUI : MonoBehaviour
|
|
{
|
|
public RectTransform content;
|
|
public TMP_Text title;
|
|
public TMP_Text subtitle;
|
|
public Image avatar;
|
|
public Image border;
|
|
public Button area;
|
|
|
|
public void Initialize(ChapterSelectionUnit chapter)
|
|
{
|
|
title.text = chapter.chapterName;
|
|
title.color = chapter.themeColor;
|
|
subtitle.text = chapter.chapterSubtitle;
|
|
subtitle.color = chapter.themeColor;
|
|
|
|
border.color = chapter.themeColor;
|
|
avatar.sprite = chapter.avatar;
|
|
|
|
area.onClick.AddListener(() =>
|
|
{
|
|
ChapterSelectionManager.instance.chapterSelectionUIPage.FadeOut();
|
|
StoryManager.instance.storyUIPage.FadeIn();
|
|
});
|
|
}
|
|
}
|
|
} |