Skip to main content

CountSelectWindowUI.SelectCount

Declaration#

public void SelectCount(InventoryThemeUI themeUI, string prompt, GDTKItem item, Int32 minCount, Int32 maxCount, Int32 defaultCount, Object[] args, Action<Int32> callback)

Parameters#

NameDescription
themeUIInventory Theme currently in use
promptPrompt to display on window
itemItem associated with the selection
minCountMinimum allowed count
maxCountMaximum allowed count
defaultCountCount selected by default
argsAdditional parameters to send
callbackCallback action to invoke with selected count (0 on cancel)

Description#

Set properties of the Select Count window

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(CountSelectWindowUI target, Inventory other)    {        GDTKItem item = other.items[0];        target.SelectCount(other.activeTheme, InventoryDatabase.instance.settings.dropPrompt, item, 0, item.count, 0, null, null);    }
    private void SelectionComplete(int count)    {        Debug.Log("Drop: " + count);    }
}