Modify texts in input config panel.

This commit is contained in:
2023-02-09 18:09:40 +08:00
parent 3dd25b51a8
commit 3e525842cb
2 changed files with 21 additions and 3 deletions

View File

@@ -20,6 +20,25 @@ namespace Cryville.Crtr.Config {
});
}
public void OnProxyChanged(ProxyChangedEventArgs e) {
if (e.Used) {
m_button.interactable = false;
m_value.text = "(Not Required)";
m_value.color = Color.black;
}
else {
m_button.interactable = true;
if (e.Proxy == null) {
m_value.text = "(Unassigned)";
m_value.color = Color.yellow;
}
else {
m_value.text = e.Proxy.Value.Handler.GetTypeName(e.Proxy.Value.Type);
m_value.color = Color.black;
}
}
}
public void SetValue(string name) {
m_value.text = name;
}