Implement the new input config.

This commit is contained in:
2023-12-01 16:52:21 +08:00
parent 4d05d0d135
commit 5c38245e23
16 changed files with 2400 additions and 165 deletions

View File

@@ -1,19 +1,15 @@
using Cryville.Common;
using Cryville.Crtr.Ruleset;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Cryville.Crtr.Config.UI {
public class InputConfigPanelEntry : MonoBehaviour {
[SerializeField]
Text m_key;
[SerializeField]
Text m_value;
[SerializeField]
Button m_button;
internal class InputConfigPanelEntry : MonoBehaviour {
[SerializeField] TextMeshProUGUI m_key;
[SerializeField] TextMeshProUGUI m_value;
[SerializeField] Button m_button;
public void SetKey(InputConfigPanel master, Identifier name) {
m_key.text = (string)name.Name;
@@ -39,7 +35,7 @@ namespace Cryville.Crtr.Config.UI {
m_value.text = e.Proxy.Value.Handler.GetTypeName(e.Proxy.Value.Type);
}
}
m_value.color = e.Required ? Color.yellow : Color.black;
m_value.color = e.Required ? Color.yellow : Color.white;
}
}
}