Ver.0.3.0.33
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
using AibisDream.Utility;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -14,6 +15,8 @@ namespace AibisDream
|
||||
public GameObject choiceButtonPrefab;
|
||||
|
||||
#endregion
|
||||
|
||||
private TextParam _textParam;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -21,7 +24,7 @@ namespace AibisDream
|
||||
_ => HideDialog());
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
Debug.Log("CenterOption只显示选项");
|
||||
}
|
||||
@@ -42,8 +45,14 @@ namespace AibisDream
|
||||
if (!option.IsAvailable) continue;
|
||||
|
||||
var choiceInstance = Instantiate(choiceButtonPrefab, transform);
|
||||
choiceInstance.GetComponentInChildren<TMP_Text>().text = option.Line;
|
||||
choiceInstance.GetComponent<Button>().onClick.AddListener(option.Select);
|
||||
var optionText = choiceInstance.GetComponentInChildren<TextMeshProUGUI>();
|
||||
optionText.text = option.Line;
|
||||
optionText.characterSpacing = _textParam.charSpace;
|
||||
choiceInstance.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
HideDialog();
|
||||
option.Select();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,5 +71,10 @@ namespace AibisDream
|
||||
{
|
||||
// 无法继续
|
||||
}
|
||||
|
||||
public void OnLocalizationChanged(string value)
|
||||
{
|
||||
_textParam = JsonUtil.ReadBeanByText<TextParam>(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user