Inventory Pro Add-On Documentation
  • Welcome to Inventory Pro Add-On for FPS Engine!
  • BEFORE WE START
    • Early Considerations
    • Add-On Compatibility
    • List of Tutorials
  • GETTING STARTED
    • 01. Basic Set-Up
    • 02. Roadmap
  • CONTENT
    • 03. Content
      • 03.1 CRAFTING
        • Recipe_SO
          • Ingredient
        • CraftingButton
        • CraftingProcess
        • CraftingUI
        • CraftingBench
        • IngredientUIIcon
      • 03.2 FAV MENU
        • FavItemSlot
        • FavItemsMenu
          • FavItemReference
      • 03.3 INTERACTABLES
        • InventoryItemPickeable
      • 03.4 INVENTORY
        • InventoryGridData_SO
        • InventoryProManager
        • GridGenerator
        • InventorySlot
        • SlotData
        • InventoryProManagerInputActions
      • 03.5 ITEMS
        • AppleItem_SO
        • EnergyDrinkItem_SO
      • 03.6 OTHERS
        • 03.6.1 TRADE HUB
          • TradeButton
          • TradeUI
          • TradeHub
        • Chest
        • ExamineItem
      • 03.7 SHOP
        • PurchasableItem
        • Shop
          • ShopItemData
        • ShopUI
        • ShopButton
      • 03.8 UI TOOLKIT
        • ContextMenu
        • HighlightInteractions
        • Padding
        • TooltipManager
    • 04. Shared Content for Add-Ons
  • HOW TO USE & GUIDES
    • Uninstalling the Add-On: Fixing Errors
    • Creating, Updating & Deleting Recipes
    • Inventory Designer: Creating, Updating & Deleting Inventory Grid Data
    • Working with Crafting Benches
    • Working with Chests
    • Working with Shops
    • Working with Purchasable Items
    • Working with Item Examination
    • Favorite Pinned Items Menu Considerations
    • Inventory, Hotbar & Chests Considerations
    • Tetris Inventory Considerations
    • Weapons & Ammo from the Inventory
    • Custom Item_SOs
    • Adding a New Inventory
  • FAQ
    • FAQ
  • SUPPORT
    • Support
Powered by GitBook
On this page
  • Getters | TradeButton.cs
  • Functions | TradeButton.cs
  1. CONTENT
  2. 03. Content
  3. 03.6 OTHERS
  4. 03.6.1 TRADE HUB

TradeButton

Previous03.6.1 TRADE HUBNextTradeUI

Last updated 27 days ago

TradeButton handles Inputs like Pointer Enter, Pointer Exit, or Click Events to the Shop UI & Shop. It allows the interaction between the Shop and the Player, and contains essential base classes for & .


  • iconImage: UI Image that displays the Icon of the Item to Trade.

  • actionButton: Button that performs the Trade Action

  • nameText: Text that displays the Name of the Item to Trade.

  • callToActionText: Text that displays the Call To Action: "Purchase", "Craft", etc...

  • amountInputField: Input Field that displays the current amount to trade

  • highlightedScaleMultiplier: When hovered, the TradeButton Scale changes. Being 1 = default scale, this defines the scale of the button when hovered.

  • scaleLerpSpeed: Defines how fast the Button scales from the default scale to the highlightedScale when hovered and viceversa.

  • lockedContainer: UI that is enabled when the object to trade is locked.

  • lockedText: Text that displays the reason why the object to trade is locked.

  • previousAmountButton: Buttons that handle amount decrease.

  • nextAmountButton: Buttons that handle amount increase.


Getters | TradeButton.cs

_TradeHub

Returns a Reference to the assigned TradeHub.

Functions | TradeButton.cs

PointerEnter() | Virtual Method, can be overrided

Called when pointer enters the Button.

PointerExit() | Virtual Method, can be overrided.

Called when pointer exits the Button.

AddItemToInventory(Item_SO item, int amount) | Protected method

Adds an Item_So and the given amount to the Inventory ( Supports Weapon_SOs, Bullets_SOs & AttachmentIdentifier_SOs )

ShopButton
CraftButton