From a2367725d6b63329ea6a571117f476c06106ea2a Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:25:15 +0000 Subject: [PATCH] fix shop vendor buying on non-click (#2906) * fix shop vendor buying on non-click * :trollface: --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../_DV/VendingMachines/UI/ShopVendorWindow.xaml.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Client/_DV/VendingMachines/UI/ShopVendorWindow.xaml.cs b/Content.Client/_DV/VendingMachines/UI/ShopVendorWindow.xaml.cs index 9335cd3e0f..b8c3e447d3 100644 --- a/Content.Client/_DV/VendingMachines/UI/ShopVendorWindow.xaml.cs +++ b/Content.Client/_DV/VendingMachines/UI/ShopVendorWindow.xaml.cs @@ -7,6 +7,7 @@ using Robust.Client.Player; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Input; using Robust.Shared.Prototypes; using Robust.Shared.Timing; using System.Numerics; @@ -43,7 +44,11 @@ public sealed partial class ShopVendorWindow : FancyWindow VendingContents.SearchBar = SearchBar; VendingContents.DataFilterCondition += DataFilterCondition; VendingContents.GenerateItem += GenerateButton; - VendingContents.ItemKeyBindDown += (args, data) => OnItemSelected?.Invoke(((ShopVendorListingData) data).Index); + VendingContents.ItemKeyBindDown += (args, data) => + { + if (args.Function == EngineKeyFunctions.UIClick) + OnItemSelected?.Invoke(((ShopVendorListingData) data).Index); + }; } public void SetEntity(EntityUid owner)