Skip to content

Commit 1cc5f55

Browse files
committed
dont show item data when dragging
1 parent 80ffd8c commit 1cc5f55

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -494,16 +494,16 @@ public void Update()
494494
}
495495

496496
var equipped = Globals.Me.MyEquipment.Any(s => s == _mySlot);
497-
_equipImageBackground.IsVisibleInParent = equipped;
498-
_equipLabel.IsVisibleInParent = equipped;
497+
_equipImageBackground.IsVisibleInParent = !IsDragging && equipped;
498+
_equipLabel.IsVisibleInParent = !IsDragging && equipped;
499499

500-
_quantityLabel.IsVisibleInParent = descriptor.IsStackable && inventorySlot.Quantity > 1;
500+
_quantityLabel.IsVisibleInParent = !IsDragging && descriptor.IsStackable && inventorySlot.Quantity > 1;
501501
if (_quantityLabel.IsVisibleInParent)
502502
{
503503
_quantityLabel.Text = FormatQuantityAbbreviated(inventorySlot.Quantity);
504504
}
505505

506-
_cooldownLabel.IsVisibleInParent = Globals.Me.IsItemOnCooldown(_mySlot);
506+
_cooldownLabel.IsVisibleInParent = !IsDragging && Globals.Me.IsItemOnCooldown(_mySlot);
507507
if (_cooldownLabel.IsVisibleInParent)
508508
{
509509
var itemCooldownRemaining = Globals.Me.GetItemRemainingCooldown(_mySlot);
@@ -581,10 +581,6 @@ public void Update()
581581
{
582582
IsDragging = true;
583583
_iconImage.IsVisibleInParent = false;
584-
_equipLabel.IsVisibleInParent = false;
585-
_equipImageBackground.IsVisibleInParent = false;
586-
_quantityLabel.IsVisibleInParent = false;
587-
_cooldownLabel.IsVisibleInParent = false;
588584

589585
_dragIcon = new Draggable(
590586
_iconImage.ToCanvas(new Point(0, 0)).X + _mouseX,
@@ -600,6 +596,7 @@ public void Update()
600596
{
601597
//Drug the item and now we stopped
602598
IsDragging = false;
599+
_iconImage.IsVisibleInParent = true;
603600

604601
var dragRect = new FloatRect(
605602
_dragIcon.X - (Padding.Left + Padding.Right) / 2f,

0 commit comments

Comments
 (0)