Item Stack Element UGUI

🎒 ItemStackElementUGUI Class

A UI object that represents an ItemStack.

Namespace: Esper.Inventool.UI.UGUI Access: public Type: class Inherits: DraggableElementUGUI


📦 Fields

Access
Field
Type
Description

public

itemStack

ItemStack

The item stack reference.

public

button

Button

Button component.

public

rectTransform

RectTransform

Cached rect transform.

public

iconImage

Image

Item icon image.

public

backgroundImage

Image

Item background image.

public

amountLabel

TextMeshProUGUI

Stack amount label.

public

equippedIndicator

RectTransform

Equipped indicator transform.

protected

dragElement

ItemStackElementUGUI

Temporary drag visual.


🧰 Methods

Access
Method
Returns
Description

public

SetItemStack(ItemStack itemStack)

void

Initialize element for an ItemStack and wire events.

public

SetIcon(Sprite sprite)

void

Set icon sprite and enable image.

public

SetBackground(Sprite sprite)

void

Set background sprite and enable image.

protected virtual

OnPointerEnter()

void

Show hover details and invoke hover event.

protected virtual

OnPointerExit()

void

Close hover details.

protected virtual

OnClick()

void

Open action menu and invoke click event.

protected

OpenActionMenu()

void

Open action menu for this item stack.

public

Refresh()

void

Update icon, background, amount, and equipped indicator.

public

SetEquippedIndicatorVisibility(bool visible)

void

Toggle equipped indicator visibility.

protected

DragStartedHandler()

void

Create drag visual and add it to ItemDragAreaUGUI.

protected

DragHandler()

void

Move drag visual to follow pointer.

protected

DropHandler()

void

Handle drop across windows (equip, craft, sell, storage) and remove drag visual.

Last updated