mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Give the wiki search box a caret so clearing it does not corrupt input
This commit is contained in:
1 parent
034521b7b6
commit
a88f9b6611
1 file changed
+9
-4
@@ -272,6 +272,9 @@ public static class RoleGuidePatches
|
||||
button.OnUp = true;
|
||||
_searchBoxTmp = searchBox.AddComponent<TextBoxTMP>();
|
||||
_searchBoxTmp.outputText = tmpText;
|
||||
var pipe = new GameObject("Pipe") { layer = searchBox.layer };
|
||||
pipe.transform.SetParent(_searchBoxTmp.transform, false);
|
||||
_searchBoxTmp.Pipe = pipe.AddComponent<MeshRenderer>();
|
||||
button.OnClick.AddListener((UnityAction)(() => { _searchBoxTmp.GiveFocus(); }));
|
||||
button.OnMouseOver = new UnityEvent();
|
||||
button.OnMouseOut = new UnityEvent();
|
||||
@@ -469,8 +472,11 @@ public static class RoleGuidePatches
|
||||
|
||||
private static void UpdateSpinner()
|
||||
{
|
||||
_loadingSpinner?.gameObject.SetActive(
|
||||
!_panelsReady && MatchInfoGuide.Instance.activeTabIndex is RolesTabIndex or ModifiersTabIndex);
|
||||
if (_loadingSpinner != null)
|
||||
{
|
||||
_loadingSpinner.gameObject.SetActive(
|
||||
!_panelsReady && MatchInfoGuide.Instance.activeTabIndex is RolesTabIndex or ModifiersTabIndex);
|
||||
}
|
||||
}
|
||||
|
||||
private static float GetGridScrollBounds(int count)
|
||||
@@ -515,8 +521,7 @@ public static class RoleGuidePatches
|
||||
_searchIconHover.sprite = MiraAssets.SearchIconHoverSprite;
|
||||
if (_searchBoxTmp)
|
||||
{
|
||||
_searchBoxTmp.outputText.text = string.Empty;
|
||||
_searchBoxTmp.text = string.Empty;
|
||||
_searchBoxTmp.Clear();
|
||||
}
|
||||
|
||||
RefreshActiveTab(true);
|
||||
|
||||
Reference in new issue
Block a user