menu
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Ichni.Story.UI
|
||||
int cIndex = index; // Capture the current index for the listener
|
||||
|
||||
GameObject choiceButton = Instantiate(choiceButtonPrefab, container);
|
||||
choiceButton.GetComponentInChildren<Localize>().SetTerm(ChapterSelectionManager.instance.currentChapter + "/" + choice.choiceText);
|
||||
choiceButton.GetComponentInChildren<Localize>().SetTerm(ChapterSelectionManager.instance.currentChapter.chapterIndex + "/" + choice.choiceText);
|
||||
choiceButton.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
DialogManager.instance.PlayNextDialogParagraph(choice.nextDialogName);
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Ichni.Story
|
||||
{
|
||||
DialogTextUI dialogTextUI = Instantiate(textPrefab, dialogContentContainer).GetComponent<DialogTextUI>();
|
||||
dialogTextUI.speakerNameText.SetTerm("Characters/" + speakerName);
|
||||
dialogTextUI.contentText.SetTerm(ChapterSelectionManager.instance.currentChapter +"/" +content);
|
||||
dialogTextUI.contentText.SetTerm(ChapterSelectionManager.instance.currentChapter.chapterIndex +"/" +content);
|
||||
dialogTexts.Add(dialogTextUI);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,22 @@ using Ichni.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Story.UI
|
||||
{
|
||||
public class DialogUIPage : UIPageBase
|
||||
{
|
||||
public Button closeButton;
|
||||
public DialogContentFrame dialogContentFrame;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
closeButton.onClick.AddListener(() =>
|
||||
{
|
||||
FadeOut();
|
||||
dialogContentFrame.ClearAllSentences();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user