Skip to content

Commit

Permalink
Add button to cancel search (unfocus input field) in music library
Browse files Browse the repository at this point in the history
  • Loading branch information
RileyTheFox committed Mar 2, 2024
1 parent 85d6367 commit 12dd641
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Assets/Script/Menu/MusicLibrary/SongSearchingField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;
using YARG.Core.Input;
using YARG.Core.Song;
using YARG.Menu.Navigation;
using YARG.Song;
Expand Down Expand Up @@ -201,7 +202,11 @@ private void Update()
if (_searchNavPushed) return;

_searchNavPushed = true;
Navigator.Instance.PushScheme(NavigationScheme.Empty);
Navigator.Instance.PushScheme(new NavigationScheme(new()
{
new NavigationScheme.Entry(MenuAction.Blue, "Cancel Search",
() => _searchField.DeactivateInputField()),
}, false));
}
else
{
Expand Down

0 comments on commit 12dd641

Please sign in to comment.