diff --git a/Intersect.Client.Core/Entities/Player.cs b/Intersect.Client.Core/Entities/Player.cs index d318429af1..5729eeb870 100644 --- a/Intersect.Client.Core/Entities/Player.cs +++ b/Intersect.Client.Core/Entities/Player.cs @@ -415,7 +415,8 @@ public void TryDropItem(int inventorySlotIndex) } var quantity = inventorySlot.Quantity; - var canDropMultiple = quantity > 1; + var maxQuantity = GetQuantityOfItemInInventory(itemDescriptor.Id); + var canDropMultiple = maxQuantity > 1; var inputType = canDropMultiple ? InputType.NumericSliderInput : InputType.YesNo; var prompt = canDropMultiple ? Strings.Inventory.DropItemPrompt : Strings.Inventory.DropPrompt; _ = new InputBox( @@ -423,7 +424,7 @@ public void TryDropItem(int inventorySlotIndex) prompt: prompt.ToString(itemDescriptor.Name), inputType: inputType, quantity: quantity, - maximumQuantity: GetQuantityOfItemInInventory(itemDescriptor.Id), + maximumQuantity: maxQuantity, userData: inventorySlotIndex, onSubmit: (sender, args) => { @@ -1120,41 +1121,32 @@ public void TryStoreItemInBag(int inventorySlotIndex, int bagSlotIndex) } var quantity = inventorySlot.Quantity; - var maxQuantity = quantity; - - if (maxQuantity < 2) - { - PacketSender.SendStoreBagItem(inventorySlotIndex, 1, bagSlotIndex); - return; - } _ = new InputBox( title: Strings.Bags.StoreItem, prompt: Strings.Bags.StoreItemPrompt.ToString(itemDescriptor.Name), - inputType: InputType.NumericSliderInput, + inputType: InputType.YesNo, quantity: quantity, - maximumQuantity: maxQuantity, - userData: new Tuple(inventorySlotIndex, bagSlotIndex), + userData: new Tuple(inventorySlotIndex, bagSlotIndex, quantity), onSubmit: TryStoreItemInBagOnSubmit ); } private static void TryStoreItemInBagOnSubmit(Base sender, InputSubmissionEventArgs args) { - if (sender is not InputBox { UserData: (int inventorySlotIndex, int bagSlotIndex) }) + if (sender is not InputBox { UserData: (int inventorySlotIndex, int bagSlotIndex, int quantity) }) { return; } - if (args.Value is not NumericalSubmissionValue submissionValue) + if (args.Value is not BooleanSubmissionValue submissionValue) { return; } - var value = (int)Math.Round(submissionValue.Value); - if (value > 0) + if (submissionValue.Value) { - PacketSender.SendStoreBagItem(inventorySlotIndex, value, bagSlotIndex); + PacketSender.SendStoreBagItem(inventorySlotIndex, quantity, bagSlotIndex); } } @@ -1444,12 +1436,17 @@ public void AddToHotbar(int hotbarSlot, sbyte itemType, int itemSlot) PacketSender.SendHotbarUpdate(hotbarSlot, itemType, itemSlot); } - public void HotbarSwap(int index, int swapIndex) + public bool HotbarSwap(int index, int swapIndex) { var itemId = Hotbar[index].ItemOrSpellId; var bagId = Hotbar[index].BagId; var stats = Hotbar[index].PreferredStatBuffs; + if (Hotbar[swapIndex].ItemOrSpellId == itemId) + { + return false; + } + Hotbar[index].ItemOrSpellId = Hotbar[swapIndex].ItemOrSpellId; Hotbar[index].BagId = Hotbar[swapIndex].BagId; Hotbar[index].PreferredStatBuffs = Hotbar[swapIndex].PreferredStatBuffs; @@ -1459,6 +1456,7 @@ public void HotbarSwap(int index, int swapIndex) Hotbar[swapIndex].PreferredStatBuffs = stats; PacketSender.SendHotbarSwap(index, swapIndex); + return true; } // Change the dimension if the player is on a gateway diff --git a/Intersect.Client.Core/Interface/Game/Bag/BagItem.cs b/Intersect.Client.Core/Interface/Game/Bag/BagItem.cs index c2c83e97a1..ab0d7ec68e 100644 --- a/Intersect.Client.Core/Interface/Game/Bag/BagItem.cs +++ b/Intersect.Client.Core/Interface/Game/Bag/BagItem.cs @@ -19,15 +19,13 @@ public partial class BagItem : SlotItem { // Controls private readonly Label _quantityLabel; - private readonly BagWindow _bagWindow; // Context Menu Handling private readonly MenuItem _withdrawContextItem; - public BagItem(BagWindow bagWindow, Base parent, int index, ContextMenu contextMenu) + public BagItem(Base parent, int index, ContextMenu contextMenu) : base(parent, nameof(BagItem), index, contextMenu) { - _bagWindow = bagWindow; TextureFilename = "bagitem.png"; Icon.HoverEnter += Icon_HoverEnter; @@ -145,6 +143,16 @@ private void Icon_DoubleClicked(Base sender, MouseButtonState arguments) public override bool DragAndDrop_HandleDrop(Package package, int x, int y) { + if (Globals.Me is not { } player) + { + return false; + } + + if (Globals.BagSlots is not { Length: > 0 } bagSlots) + { + return false; + } + var targetNode = Interface.FindComponentUnderCursor(); // Find the first parent acceptable in that tree that can accept the package @@ -154,11 +162,11 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) { case BagItem bagItem: PacketSender.SendMoveBagItems(SlotIndex, bagItem.SlotIndex); - return true; + return bagSlots[bagItem.SlotIndex] is not { Quantity: > 0 }; case InventoryItem inventoryItem: - Globals.Me?.TryRetrieveItemFromBag(SlotIndex, inventoryItem.SlotIndex); - return true; + player.TryRetrieveItemFromBag(SlotIndex, inventoryItem.SlotIndex); + return bagSlots[inventoryItem.SlotIndex] is not { Quantity: > 0 }; default: targetNode = targetNode.Parent; @@ -194,7 +202,7 @@ public override void Update() var bagSlot = bagSlots[SlotIndex]; var descriptor = bagSlot.Descriptor; - _quantityLabel.IsVisibleInParent = !Icon.IsDragging && descriptor.IsStackable && bagSlot.Quantity > 1; + _quantityLabel.IsVisibleInParent = !Icon.IsHidden && descriptor.IsStackable && bagSlot.Quantity > 1; if (_quantityLabel.IsVisibleInParent) { _quantityLabel.Text = Strings.FormatQuantityAbbreviated(bagSlot.Quantity); diff --git a/Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs b/Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs index 7c88c48f93..6deb89dd9b 100644 --- a/Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs +++ b/Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs @@ -58,7 +58,7 @@ private void InitItemContainer() for (var slotIndex = 0; slotIndex < bagSlots.Length; slotIndex++) { - Items.Add(new BagItem(this, _slotContainer, slotIndex, _contextMenu)); + Items.Add(new BagItem(_slotContainer, slotIndex, _contextMenu)); } PopulateSlotContainer.Populate(_slotContainer, Items); diff --git a/Intersect.Client.Core/Interface/Game/Bank/BankItem.cs b/Intersect.Client.Core/Interface/Game/Bank/BankItem.cs index a9c7194737..7a832a64a9 100644 --- a/Intersect.Client.Core/Interface/Game/Bank/BankItem.cs +++ b/Intersect.Client.Core/Interface/Game/Bank/BankItem.cs @@ -22,15 +22,12 @@ public partial class BankItem : SlotItem { // Controls private readonly Label _quantityLabel; - private BankWindow _bankWindow; // Context Menu Handling private MenuItem _withdrawContextItem; - public BankItem(BankWindow bankWindow, Base parent, int index, ContextMenu contextMenu) : - base(parent, nameof(BankItem), index, contextMenu) + public BankItem(Base parent, int index, ContextMenu contextMenu) : base(parent, nameof(BankItem), index, contextMenu) { - _bankWindow = bankWindow; TextureFilename = "bankitem.png"; Icon.HoverEnter += Icon_HoverEnter; @@ -105,6 +102,7 @@ private void Icon_HoverEnter(Base? sender, EventArgs? arguments) if (bankSlots[SlotIndex] is not { Descriptor: not null } or { Quantity: <= 0 }) { + _quantityLabel.IsVisibleInParent = false; return; } @@ -194,29 +192,28 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) } } + if (Globals.BankSlots is not { Length: > 0 } bankSlots) + { + return false; + } + var targetNode = Interface.FindComponentUnderCursor(); // Find the first parent acceptable in that tree that can accept the package while (targetNode != default) { + if (bankSlots[SlotIndex] is not { Quantity: > 0 } slot) + { + return false; + } + switch (targetNode) { case BankItem bankItem: PacketSender.SendMoveBankItems(SlotIndex, bankItem.SlotIndex); - return true; + return bankSlots[bankItem.SlotIndex] is not { Quantity: > 0 }; case InventoryItem inventoryItem: - - if (Globals.BankSlots is not { Length: > 0 } bankSlots) - { - return false; - } - - if (bankSlots[SlotIndex] is not { Quantity: > 0 } slot) - { - return false; - } - player.TryRetrieveItemFromBank( SlotIndex, inventorySlotIndex: inventoryItem.SlotIndex, @@ -259,7 +256,7 @@ public override void Update() var bankSlot = bankSlots[SlotIndex]; var descriptor = bankSlot.Descriptor; - _quantityLabel.IsVisibleInParent = !Icon.IsDragging && descriptor.IsStackable && bankSlot.Quantity > 1; + _quantityLabel.IsVisibleInParent = descriptor.IsStackable && bankSlot.Quantity > 1 && !Icon.IsHidden; if (_quantityLabel.IsVisibleInParent) { _quantityLabel.Text = Strings.FormatQuantityAbbreviated(bankSlot.Quantity); @@ -283,6 +280,7 @@ public override void Update() { Icon.Texture = default; Icon.IsVisibleInParent = false; + _quantityLabel.IsVisibleInParent = false; } } } diff --git a/Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs b/Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs index a618f1e7a7..13d8a765c2 100644 --- a/Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs +++ b/Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs @@ -67,7 +67,7 @@ private void InitItemContainer() { for (var slotIndex = 0; slotIndex < Globals.BankSlotCount; slotIndex++) { - Items.Add(new BankItem(this, _slotContainer, slotIndex, _contextMenu)); + Items.Add(new BankItem(_slotContainer, slotIndex, _contextMenu)); } PopulateSlotContainer.Populate(_slotContainer, Items); diff --git a/Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs b/Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs index 9467c216a6..ce9623d55c 100644 --- a/Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs +++ b/Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs @@ -4,7 +4,6 @@ using Intersect.Client.General; using Intersect.Framework.Core.GameObjects.Crafting; using Intersect.Framework.Core.GameObjects.Items; -using Intersect.GameObjects; namespace Intersect.Client.Interface.Game.Crafting; @@ -14,8 +13,6 @@ public partial class RecipeItem public ImagePanel? Container; - public bool IsDragging; - //Dragging private bool mCanDrag; diff --git a/Intersect.Client.Core/Interface/Game/Draggable.cs b/Intersect.Client.Core/Interface/Game/Draggable.cs index 1205e3a1c5..94d0fe744f 100644 --- a/Intersect.Client.Core/Interface/Game/Draggable.cs +++ b/Intersect.Client.Core/Interface/Game/Draggable.cs @@ -16,6 +16,7 @@ public override bool DragAndDrop_Draggable() public override bool DragAndDrop_CanAcceptPackage(Package package) { + // Important: Icon is the topmost hovered control, so it must be allowed to "receive" the drop, BUT: we forward handling to SlotItem. return true; } @@ -27,6 +28,7 @@ public override bool DragAndDrop_CanAcceptPackage(Package package) DrawControl = this, Name = Name, HoldOffset = ToLocal(InputHandler.MousePosition.X, InputHandler.MousePosition.Y), + UserData = Parent, // Expected to be SlotItem (InventoryItem/BankItem/etc) }; } @@ -37,6 +39,24 @@ public override void DragAndDrop_StartDragging(Package package, int x, int y) public override void DragAndDrop_EndDragging(bool success, int x, int y) { - IsVisibleInParent = true; + IsVisibleInParent = !success; + } + + public override bool DragAndDrop_HandleDrop(Package package, int x, int y) + { + // Never allow Base.DragAndDrop_HandleDrop() to run on the icon because it reparents SourceControl (Base.cs) + // Forward drop handling to the slot (or nearest SlotItem ancestor). + var node = Parent; + while (node != null) + { + if (node is SlotItem) + { + return node.DragAndDrop_HandleDrop(package, x, y); + } + + node = node.Parent; + } + + return false; } } \ No newline at end of file diff --git a/Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs b/Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs index 1783f5fa6f..353fd06b38 100644 --- a/Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs +++ b/Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs @@ -217,12 +217,9 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) if (targetNode is HotbarItem hotbarItem) { player.HotbarSwap(SlotIndex, hotbarItem.SlotIndex); - return true; - } - else - { - targetNode = targetNode.Parent; } + + targetNode = targetNode.Parent; } // If we've reached the top of the tree, we can't drop here, so cancel drop diff --git a/Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs b/Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs index bfa5324fec..d3310d8321 100644 --- a/Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs +++ b/Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs @@ -13,7 +13,6 @@ using Intersect.Client.Interface.Game.Hotbar; using Intersect.Client.Interface.Game.Shop; using Intersect.Client.Localization; -using Intersect.Client.Networking; using Intersect.Configuration; using Intersect.Framework.Core.GameObjects.Items; using Intersect.GameObjects; @@ -403,12 +402,6 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) return false; } - if (!Interface.DoesMouseHitInterface() && !player.IsBusy) - { - PacketSender.SendDropItem(SlotIndex, inventorySlot.Quantity); - return true; - } - var targetNode = Interface.FindComponentUnderCursor(); // Find the first parent acceptable in that tree that can accept the package @@ -427,24 +420,23 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) case BagItem bagItem: player.TryStoreItemInBag(SlotIndex, bagItem.SlotIndex); - return true; + return false; case BankItem bankItem: - player.TryStoreItemInBank( + return player.TryStoreItemInBank( SlotIndex, bankSlotIndex: bankItem.SlotIndex, quantityHint: inventorySlot.Quantity, skipPrompt: true ); - return true; case HotbarItem hotbarItem: player.AddToHotbar(hotbarItem.SlotIndex, 0, SlotIndex); - return true; + return false; case ShopWindow: player.TrySellItem(SlotIndex); - return true; + return false; default: targetNode = targetNode.Parent; @@ -452,7 +444,11 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) } } - // If we've reached the top of the tree, we can't drop here, so cancel drop + if (!Interface.DoesMouseHitInterface() && !player.IsBusy) + { + player.TryDropItem(SlotIndex); + } + return false; } @@ -477,6 +473,7 @@ private void PlayerOnInventoryUpdated(Player player, int slotIndex) // empty texture to reload on update Icon.Texture = default; + Icon.IsVisibleInParent = false; } public override void Update() @@ -498,17 +495,14 @@ public override void Update() } var equipped = Globals.Me.MyEquipment.Any(s => s == SlotIndex); - var isDragging = Icon.IsDragging; - _equipImageBackground.IsVisibleInParent = !isDragging && equipped; - _equipLabel.IsVisibleInParent = !isDragging && equipped; - - _quantityLabel.IsVisibleInParent = !isDragging && descriptor.IsStackable && inventorySlot.Quantity > 1; + _equipImageBackground.IsVisibleInParent = !Icon.IsDragging && equipped; + _equipLabel.IsVisibleInParent = !Icon.IsHidden && equipped; + _quantityLabel.IsVisibleInParent = !Icon.IsHidden && descriptor.IsStackable && inventorySlot.Quantity > 1; if (_quantityLabel.IsVisibleInParent) { _quantityLabel.Text = Strings.FormatQuantityAbbreviated(inventorySlot.Quantity); } - - _cooldownLabel.IsVisibleInParent = !isDragging && Globals.Me.IsItemOnCooldown(SlotIndex); + _cooldownLabel.IsVisibleInParent = !Icon.IsHidden && Globals.Me.IsItemOnCooldown(SlotIndex); if (_cooldownLabel.IsVisibleInParent) { var itemCooldownRemaining = Globals.Me.GetItemRemainingCooldown(SlotIndex); diff --git a/Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs b/Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs index f56ef18ef6..6becd3c390 100644 --- a/Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs +++ b/Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs @@ -16,13 +16,11 @@ namespace Intersect.Client.Interface.Game.Shop; public partial class ShopItem : SlotItem { private readonly int _mySlot; - private readonly ShopWindow _shopWindow; private readonly MenuItem _buyMenuItem; - public ShopItem(ShopWindow shopWindow, Base parent, int index, ContextMenu contextMenu) + public ShopItem(Base parent, int index, ContextMenu contextMenu) : base(parent, nameof(ShopItem), index, contextMenu) { - _shopWindow = shopWindow; _mySlot = index; TextureFilename = "shopitem.png"; @@ -106,7 +104,7 @@ private void Icon_DoubleClicked(Base sender, MouseButtonState arguments) Globals.Me?.TryBuyItem(_mySlot); } - private void _buyMenuItem_Clicked(Base sender, Framework.Gwen.Control.EventArguments.MouseButtonState arguments) + private void _buyMenuItem_Clicked(Base sender, MouseButtonState arguments) { Globals.Me?.TryBuyItem(_mySlot); } diff --git a/Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs b/Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs index a5a0f538a3..a28587aea5 100644 --- a/Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs +++ b/Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs @@ -58,7 +58,7 @@ private void InitItemContainer() for (var slotIndex = 0; slotIndex < gameShop.SellingItems.Count; slotIndex++) { - _items.Add(new ShopItem(this, _slotContainer, slotIndex, _contextMenu)); + _items.Add(new ShopItem(_slotContainer, slotIndex, _contextMenu)); } PopulateSlotContainer.Populate(_slotContainer, _items); diff --git a/Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs b/Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs index a10b3a6ebe..d875f1ad7f 100644 --- a/Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs +++ b/Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs @@ -173,7 +173,7 @@ public override bool DragAndDrop_HandleDrop(Package package, int x, int y) case HotbarItem hotbarItem: player.AddToHotbar(hotbarItem.SlotIndex, 1, SlotIndex); - return true; + return false; default: targetNode = targetNode.Parent; @@ -207,7 +207,7 @@ public override void Update() return; } - _cooldownLabel.IsVisibleInParent = !Icon.IsDragging && Globals.Me.IsSpellOnCooldown(SlotIndex); + _cooldownLabel.IsVisibleInParent = !Icon.IsHidden && Globals.Me.IsSpellOnCooldown(SlotIndex); if (_cooldownLabel.IsVisibleInParent) { var itemCooldownRemaining = Globals.Me.GetSpellRemainingCooldown(SlotIndex); @@ -219,22 +219,24 @@ public override void Update() Icon.RenderColor.A = 255; } - if (Path.GetFileName(Icon.Texture?.Name) != spell.Icon) + if (Icon.TextureFilename == spell.Icon) { - var spellIconTexture = GameContentManager.Current.GetTexture(TextureType.Spell, spell.Icon); - if (spellIconTexture != null) - { - Icon.Texture = spellIconTexture; - Icon.RenderColor.A = (byte)(_cooldownLabel.IsVisibleInParent ? 100 : 255); - Icon.IsVisibleInParent = true; - } - else + return; + } + + var spellTexture = GameContentManager.Current.GetTexture(TextureType.Spell, spell.Icon); + if (spellTexture != default) + { + Icon.Texture = spellTexture; + Icon.RenderColor.A = (byte)(_cooldownLabel.IsVisibleInParent ? 100 : 255); + Icon.IsVisibleInParent = true; + } + else + { + if (Icon.Texture != null) { - if (Icon.Texture != null) - { - Icon.Texture = null; - Icon.IsVisibleInParent = false; - } + Icon.Texture = null; + Icon.IsVisibleInParent = false; } } } diff --git a/Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs b/Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs index 0384b263d9..dfd246e0fa 100644 --- a/Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs +++ b/Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs @@ -6,7 +6,6 @@ using Intersect.Client.General; using Intersect.Configuration; using Intersect.Framework.Core.GameObjects.Items; -using Intersect.GameObjects; namespace Intersect.Client.Interface.Game.Trades; diff --git a/Intersect.Client.Core/Localization/Strings.cs b/Intersect.Client.Core/Localization/Strings.cs index ea8fb4106c..722a8f3c8c 100644 --- a/Intersect.Client.Core/Localization/Strings.cs +++ b/Intersect.Client.Core/Localization/Strings.cs @@ -541,7 +541,10 @@ public partial struct Bags public static LocalizedString StoreItem = @"Store Item"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString StoreItemPrompt = @"How many/much {00} would you like to store?"; + public static LocalizedString StoreMultipleItemPrompt = @"How many/much {00} would you like to store?"; + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString StoreItemPrompt = @"Do you wish to store the item: {00} ?"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public static LocalizedString Title = @"Bag"; diff --git a/Intersect.Client.Framework/Entities/IPlayer.cs b/Intersect.Client.Framework/Entities/IPlayer.cs index 7142371d2e..e0ff8aec6c 100644 --- a/Intersect.Client.Framework/Entities/IPlayer.cs +++ b/Intersect.Client.Framework/Entities/IPlayer.cs @@ -34,7 +34,7 @@ public interface IPlayer : IEntity void AddToHotbar(int hotbarSlot, sbyte itemType, int itemSlot); int FindHotbarItem(IHotbarInstance hotbarInstance); int FindHotbarSpell(IHotbarInstance hotbarInstance); - void HotbarSwap(int index, int swapIndex); + bool HotbarSwap(int index, int swapIndex); int FindItem(Guid itemId, int itemVal = 1); void SwapItems(int item1, int item2); long GetItemCooldown(Guid id); diff --git a/Intersect.Client.Framework/Gwen/DragDrop/DragAndDrop.cs b/Intersect.Client.Framework/Gwen/DragDrop/DragAndDrop.cs index 97f634e58b..325a8a89d1 100644 --- a/Intersect.Client.Framework/Gwen/DragDrop/DragAndDrop.cs +++ b/Intersect.Client.Framework/Gwen/DragDrop/DragAndDrop.cs @@ -58,7 +58,7 @@ private static bool ShouldStartDraggingControl(int x, int y) // Not been dragged far enough var length = Math.Abs(x - sLastPressedPos.X) + Math.Abs(y - sLastPressedPos.Y); - if (length < 5) + if (length <= 1) { return false; }