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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user