Equipment Slot Element UGUI

🧩 EquipmentSlotElementUGUI Class

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


📦 Fields

Access
Field
Type
Description

public

slot

EquipmentSlot

The slot data.

public

button

Button

The button component.

public

rectTransform

RectTransform

The rect transform.

public

slotIcon

Image

Image used to display the slot icon.

public

itemBackground

Image

Image used to display the item background.

public

itemIcon

Image

Image used to display the item icon.

protected

dragElement

EquipmentSlotElementUGUI

Element created while the item stack is being dragged.


🔍 Properties

Access
Property
Type
Description

public

IsVisible

bool

True if this equipment slot is visible.

public

HasItem

bool

True if this equipment slot has an item.


🧰 Methods

Access
Method
Returns
Description

private

Awake()

void

Sets up drag handlers, hover events, and click listener.

protected

OnPointerEnter()

void

Opens hover details for this slot.

protected

OnPointerExit()

void

Closes hover details for this slot.

protected

OnClick()

void

Invokes slot clicked and opens the action menu.

protected

DragStartedHandler()

void

Creates and registers a drag element visual.

protected

DragHandler()

void

Positions the drag element to follow the mouse.

protected

DropHandler()

void

Handles drop logic: unequip, switch slots, and UI updates.

protected

OpenActionMenu()

void

Opens the action menu with this element as the target.

public

Refresh()

void

Refreshes visuals (icons, backgrounds) based on slot content.

public

SetData(EquipmentSlot slot)

void

Assigns slot data and toggles visibility; refreshes the element.

Last updated