CountSelectWindowUI.SelectCount
Declaration#
public void SelectCount(InventoryThemeUI themeUI, string prompt, GDTKItem item, Int32 minCount, Int32 maxCount, Int32 defaultCount, Object[] args, Action<Int32> callback)Parameters#
| Name | Description |
|---|---|
| themeUI | Inventory Theme currently in use |
| prompt | Prompt to display on window |
| item | Item associated with the selection |
| minCount | Minimum allowed count |
| maxCount | Maximum allowed count |
| defaultCount | Count selected by default |
| args | Additional parameters to send |
| callback | Callback 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); }
}