Rewrite property panel to adapt to ruleset config.
This commit is contained in:
18
Assets/Cryville/Crtr/Config/PVPString.cs
Normal file
18
Assets/Cryville/Crtr/Config/PVPString.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Cryville.Crtr.Config {
|
||||
public class PVPString : PropertyValuePanel {
|
||||
protected override void OnValueUpdated() { _inputField.text = (string)MappedValue; }
|
||||
|
||||
InputField _inputField;
|
||||
|
||||
void Awake() {
|
||||
_inputField = GetComponent<InputField>();
|
||||
_inputField.onValueChanged.AddListener(OnValueChanged);
|
||||
}
|
||||
|
||||
void OnValueChanged(string value) {
|
||||
RawValue = value;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user