Skip to content

Commit a7796d0

Browse files
pr changes
1 parent 7458fda commit a7796d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Assets/YahalomUIPackage/Runtime/YahalomInputField/YahalomInputField.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,17 @@ protected override void DoStateTransition(SelectionState state, bool instant)
8888
{
8989
case SelectionState.Disabled:
9090
textColor = _disabledTextColor;
91+
SetCloseButtonState(false);
9192
break;
9293
case SelectionState.Highlighted:
9394
case SelectionState.Pressed:
9495
case SelectionState.Selected:
9596
textColor = _highlightedTextColor;
97+
SetCloseButtonState(true);
9698
break;
9799
case SelectionState.Normal:
98100
textColor = _normalTextColor;
101+
SetCloseButtonState(false);
99102
break;
100103
}
101104

@@ -133,5 +136,11 @@ public void SetErrorPredicate(Func<string, bool> predicate)
133136
{
134137
_errorPredicate = predicate;
135138
}
139+
140+
private void SetCloseButtonState(bool value)
141+
{
142+
_closeButton.gameObject.SetActive(value);
143+
144+
}
136145
}
137146
}

0 commit comments

Comments
 (0)