Inventool Documentation
  • Inventool Documentation
  • đŸ•šī¸Quick Start
    • Installation
    • Start Creating
  • 💡General
    • Running the Demo
    • Menu Options
    • UI Updates
    • UI Customizations
      • uGUI
      • UI Toolkit
    • Custom Item Drops
  • 🎓Tutorials
    • Demo Walkthrough
  • âœī¸Editors
    • Inventool
      • Inventory
      • Equipment
      • Items
      • Currencies
      • Crafting
      • Dismantling
      • Enchanting
      • Stats
        • Stat IDs
        • Attributes
      • Settings
    • Item Type Manager
    • Localization Editor
    • Stats Editor
    • Merchants
      • Shopkeeper
      • Craftsman
      • Enchanter
    • Storage
    • Loot
      • Loot Box
      • Item Pouch
      • Currency Pouch
    • Components
      • Initializer
      • UI
        • uGUI
          • Inventool Window
          • Split UI
            • Inventory Window UGUI
            • Equipment Window UGUI
            • Key Items Window UGUI
            • Crafting Window UGUI
            • Enchanting Window UGUI
            • Storage Window UGUI
            • Shop Window UGUI
            • Selector UGUI
          • Action Menu UGUI
          • Hover Details UGUI
          • Confirm Prompt UGUI
          • Quantity Prompt UGUI
          • Character Viewer Element UGUI
        • UI Toolkit
          • Inventool Window
          • Split UI
            • Inventory Window
            • Equipment Window
            • Key Items Window
            • Crafting Window
            • Enchanting Window
            • Storage Window
            • Shop Window
          • Action Menu
          • Hover Details
          • Confirm Prompt
          • Quantity Prompt
        • Character Viewer
      • Overworld Merchant
      • Storage Keeper
      • Item Drop
      • Item Spawner
      • Input
        • Cross Input Support
        • Cross Input Support UGUI
          • Target Selectable
  • 📄Scripting API
    • Initialization
    • Inventory
    • Equipment
      • Equipment Slot
    • Items
      • Item
      • Item Type
      • Item Stack
      • Item Drop
      • Item Spawner
      • Loot Box
      • Item Pouch
    • Currencies
      • Currency Identity
      • Currency
        • Value
      • Currency Pouch
    • Crafting
      • Craft
      • Crafter
    • Enchanting
      • Enchantment
    • Stats
      • Stat Identity
      • Attribute
      • Stat
        • Stat Value
          • Value
        • Effectiveness
      • Stat Profile
    • Storing
      • Storage
      • Storage Keeper
    • Settings
    • Merchants
      • Shopkeeper
      • Craftsman
      • Enchanter
      • Overworld Merchant
    • UI
      • uGUI
        • Inventool Window UGUI
        • Split UI
          • Draggable Window UGUI
            • Inventory Window UGUI
            • Equipment Window UGUI
            • Key Items Window UGUI
            • Crafting Window UGUI
            • Enchanting Window UGUI
            • Storage Window UGUI
            • Shop Window UGUI
          • Selector UGUI
        • Action Menu UGUI
        • Hover Details UGUI
        • Confirm Prompt UGUI
        • Quantity Prompt UGUI
        • Draggable Element UGUI
          • Equipment Slot Element UGUI
          • Item Slot Element UGUI
          • Item Stack Element UGUI
        • Action Menu Option UGUI
        • Currency Element UGUI
        • Inventory Filter UGUI
        • Inventory Slot UGUI
        • Key Item Element UGUI
        • Shop Item Element UGUI
        • Storage Currency Element UGUI
        • Stat Element UGUI
      • UI Toolkit
        • Inventool Window
        • Split UI
          • Draggable Window
            • Inventory Window
            • Equipment Window
            • Key Items Window
            • Crafting Window
            • Enchanting Window
            • Storage Window
            • Shop Window
        • Action Menu
        • Hover Details
        • Confirm Prompt
        • Quantity Prompt
        • Item Elements
          • Item Stack Element
          • Equipment Slot Element
          • Item Slot Element
          • Shop Item Element
      • Action Menu Option
      • Character Viewer
    • Events
    • Sounds
    • Saving & Loading
      • Inventory & Equipment
      • Storage
    • Input
      • Cross Input Support
      • Cross Input Support UGUI
    • Localization
      • Localization Settings
      • Localizer
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
    • Future Plans
  • ⭐Rate Me?
Powered by GitBook
On this page
  • Fields & Properties
  • Active Instance
  • Open
  • Close
  1. Scripting API
  2. UI
  3. UI Toolkit

Quantity Prompt

Scripting with the InventoolQuantityPrompt class.

The InventoolConfirmPrompt class is a pop-up UI element that prompts the user to confirm or cancel an action that requires a user-defined quantity.

Fields & Properties

Name
Description
Type
Access

document

The UI document.

UIDocument

protected

minQuantity

The minimum quantity.

float

protected

maxQuantity

The maximum quantity.

float

protected

currentQuantity

The current quantity set by the user.

float

protected

root

The root element

VisualElement

protected

hiddenCloseButton

The full-screen invisible close button.

Button

protected

titleLabel

The title label.

Label

protected

targetGraphic

The element that displays the image of the target.

VisualElement

protected

quantitySliderInt

The quantity slider (int).

SliderInt

protected

quantityFieldInt

The quantity input field (int).

IntegerField

protected

quantitySliderFloat

The quantity slider (float).

Slider

protected

quantityFieldFloat

The quantity input field (float).

FloatField

protected

leftButton

The left button option.

Button

protected

rightButton

The right button option.

Button

protected

leftButtonIconElement

Left button icon element.

VisualElement

protected

rightButtonIconElement

Right button icon element.

VisualElement

protected

leftButtonLabel

The left button label.

Label

protected

rightButtonLabel

The right button label.

Label

protected

spacing

The button spacing element.

VisualElement

protected

leftButtonAction

The left button on-click action.

Action<float>

protected

rightButtonAction

The right button on-click action.

Action<float>

protected

rightButtonTextSetter

A text setter for the right button label.

Func<float, string>

protected

quantityMode

The quantity mode.

QuantityMode

protected

LeftButtonColor

The left button color.

Color

public

RightButtonColor

The right button color.

Color

public

IsOpen

If the window is currently open.

bool

public

Active Instance

You can get the active InventoolConfirmPrompt instance with InventoolConfirmPrompt.Instance. Ensure there's an instance of it in your scene before using this field.

Open

The Open method has many parameters you can use to customize what's displayed on the confirm prompt.

Name
Description
Type

title

The prompt title or the localized string key if you're using localization.

string

minQuantity

The minimum quantity.

float

maxQuantity

The maximum quantity.

float

leftButtonAction

The left button on-click action.

Action<float>

rightButtonAction

The right button on-click action.

Action<float>

showLeftButton

If the left button should be displayed.

bool

showRightButton

If the right button should be displayed.

bool

leftButtonText

The left button text or the localized string key if you're using localization.

string

rightButtonText

The right button text or the localized string key if you're using localization.

string

targetGraphic

A sprite that represents the target of the action.

Sprite

leftButtonIcon

The left button icon.

Sprite

rightButtonIcon

The right button icon.

Sprite

rightButtonTextSetter

The right button text setter.

Func<float, string>

// Open with range from 0 to 100
InventoolQuantityPrompt.Instance.Open("My Title", 0, 100);

Close

InventoolQuantityPrompt.Instance.Close();
PreviousConfirm PromptNextItem Elements

Last updated 2 months ago

📄