Adds a search bar to vending machines (#20326)

* Adds a search bar to vending machines

* fix indentation

* whitespace again

---------

Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
ike709
2023-09-20 12:40:41 -07:00
committed by GitHub
parent 9441f6b53a
commit 3ee729f3fd
4 changed files with 37 additions and 10 deletions

View File

@@ -30,6 +30,7 @@ namespace Content.Client.VendingMachines
_menu.OnClose += Close;
_menu.OnItemSelected += OnItemSelected;
_menu.OnSearchChanged += OnSearchChanged;
_menu.Populate(_cachedInventory);
@@ -74,5 +75,10 @@ namespace Content.Client.VendingMachines
_menu.OnClose -= Close;
_menu.Dispose();
}
private void OnSearchChanged(string? filter)
{
_menu?.Populate(_cachedInventory, filter);
}
}
}