1
This commit is contained in:
37
Assets/Scripts/UI/ChapterSelection/ChapterSelectionUI.cs
Normal file
37
Assets/Scripts/UI/ChapterSelection/ChapterSelectionUI.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user