This commit is contained in:
2026-05-30 09:16:35 +07:00
parent 2f87ce19a7
commit 1c0ee6efb7
4001 changed files with 3363438 additions and 1738 deletions

View File

@@ -0,0 +1,39 @@
using UnityEngine;
using UnityEngine.UI;
namespace Invector.vItemManager
{
public class vItemAmountWindow : vMasterWindow
{
public vItemWindowDisplay itemWindowDisplay;
public GameObject singleAmountControl;
public GameObject multAmountControl;
public Text amountDisplay;
protected override void OnEnable()
{
base.OnEnable();
if (itemWindowDisplay)
{
if (itemWindowDisplay.currentSelectedSlot.item)
{
singleAmountControl.SetActive(!(itemWindowDisplay.currentSelectedSlot.item.amount > 1));
multAmountControl.SetActive(itemWindowDisplay.currentSelectedSlot.item.amount > 1);
if (amountDisplay)
amountDisplay.text = (1).ToString("00");
itemWindowDisplay.amount = 1;
}
}
}
public virtual void ChangeAmount(int value)
{
if (itemWindowDisplay && itemWindowDisplay.currentSelectedSlot.item)
{
itemWindowDisplay.amount += value;
itemWindowDisplay.amount = Mathf.Clamp(itemWindowDisplay.amount, 1, itemWindowDisplay.currentSelectedSlot.item.amount);
if (amountDisplay)
amountDisplay.text = itemWindowDisplay.amount.ToString("00");
}
}
}
}