# CraftingButton

{% hint style="info" %}
`CraftingButton` inherits from [TradeButton](https://cowsinss-organization.gitbook.io/inventory-pro-add-on-documentation/content/03.-content/03.6-others/03.6.1-trade-hub/tradebutton)
{% endhint %}

CraftingButton sends Player Inputs like Pointer Enter, Pointer Exit, or Click Events to the CraftingUI & CraftingBench. It also handles UI updates to display the current Crafting Progress.

***

### CRAFTING BUTTON

* <mark style="color:purple;">craftCallToAction:</mark> Text displayed on the Button when an Item can be crafted.
* <mark style="color:purple;">collectCallToAction:</mark> Text displayed on the Button when an Item has been successfully crafted & can be collected.
* <mark style="color:purple;">craftingProgressIndicator:</mark> Fills up to display the current progress of a Crafting Process.

{% hint style="info" %}
The rest of properties are part of [TradeButton](https://cowsinss-organization.gitbook.io/inventory-pro-add-on-documentation/content/03.-content/03.6-others/03.6.1-trade-hub/tradebutton).
{% endhint %}

### Getters | CraftingButton.cs&#x20;

> <mark style="color:orange;">RecipeSO</mark>
>
> Returns the recipe associated to the Button.

### Functions | CraftingButton.cs&#x20;

> <mark style="color:green;">SetCurrentAmountText()</mark>
>
> Updates Current Amount Text with the current amount value to ensure it is up-to-date.

> <mark style="color:green;">StartCrafting()</mark>
>
> Begins a Crafting Process for the current recipeSO.

> <mark style="color:green;">FinishCrafting()</mark>
>
> Finishes the Crafting Process for the current recipeSO.
