Add hung color to input dialog entry.
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Cryville.Crtr.Config.UI {
|
||||
[SerializeField] Graphic m_iW;
|
||||
[SerializeField] Color m_invalidColor;
|
||||
[SerializeField] Color m_inactiveColor;
|
||||
[SerializeField] Color m_hungColor;
|
||||
[SerializeField] Color m_activeColor;
|
||||
[SerializeField] Color m_restColor;
|
||||
[SerializeField] Color m_motionColor;
|
||||
@@ -61,6 +62,14 @@ namespace Cryville.Crtr.Config.UI {
|
||||
Clicked?.Invoke();
|
||||
}
|
||||
|
||||
bool _hung;
|
||||
void Update() {
|
||||
if (_activeInputs.Count > 0) {
|
||||
if (_hung) m_iNull.color = m_hungColor;
|
||||
else _hung = true;
|
||||
}
|
||||
}
|
||||
|
||||
float _maxScalar;
|
||||
Dictionary<int, InputVector> _activeInputs;
|
||||
public void OnInputEvent(InputEvent ev) {
|
||||
@@ -91,6 +100,7 @@ namespace Cryville.Crtr.Config.UI {
|
||||
_activeInputs[id] = vec;
|
||||
}
|
||||
m_iNull.color = _activeInputs.Count > 0 ? m_activeColor : m_inactiveColor;
|
||||
_hung = false;
|
||||
}
|
||||
void UpdateVectorIndicator(Graphic i, float v) {
|
||||
float a = MathF.Abs(v);
|
||||
|
Reference in New Issue
Block a user