新增input单位
This commit is contained in:
parent
7fb8fd3c64
commit
2d2a660edf
@ -14,6 +14,7 @@ namespace QFramework.Example
|
||||
public string name;
|
||||
public string var;
|
||||
public string answer;
|
||||
public string unit;
|
||||
}
|
||||
public class BtnData
|
||||
{
|
||||
@ -55,6 +56,7 @@ namespace QFramework.Example
|
||||
GameObject input = GameObject.Instantiate(InputItem.gameObject, InputContent);
|
||||
input.name = item.name;
|
||||
input.transform.Find("Name").GetComponent<TextMeshProUGUI>().text = item.name;
|
||||
input.transform.Find("Unit").GetComponent<TextMeshProUGUI>().text = item.unit;
|
||||
var inputField = input.transform.Find("Input").GetComponent<TMP_InputField>();
|
||||
inputField.onEndEdit.AddListener(value =>
|
||||
{
|
||||
|
||||
@ -1529,6 +1529,7 @@ namespace XMLTool
|
||||
inputData.answer = item.Attribute("answer")?.Value;
|
||||
inputData.var = item.Attribute("var")?.Value;
|
||||
inputData.name = item.Attribute("name")?.Value;
|
||||
inputData.unit = item.Attribute("unit")?.Value;
|
||||
act.data.inputs.Add(inputData);
|
||||
}
|
||||
foreach (var item in action.Elements("Btn"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user