Skip to main content

UI.IInvSlotElement

This is the base Java abstract class, which are all Inner Core element types inherited from. In Java, to create custom element types, you can inherit your element class from this one as well. Whereas in JavaScript, you should use "custom" element type in description object, where you can specify custom behavior for different events. For more information about custom element types in JavaScript, see UI.UICustomElement.

Hierarchy

Index

Properties

background

background: Texture

cleaner

curCount

curCount: number

curData

curData: number

curExtra

curExtra: ItemExtraData

curId

curId: number

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDarken

isDarken: boolean

isDarkenAtZero

isDarkenAtZero: boolean

isDirty

isDirty: boolean

isTouched

isTouched: boolean

isVisual

isVisual: boolean

maxStackSize

maxStackSize: number

size

size: number

slotName

slotName: string

source

textOverride

textOverride: string

window

window: Window

x

x: number

y

y: number

z

z: number

Methods

createTexture

debug

  • debug(canvas: Canvas, scale: number): void
  • Parameters

    Returns void

getBinding

  • Gets any value from the element.


    Type parameters

    • T = any

    Parameters

    • name: string

      binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g. "element_obj" contains pointer to the current object and "element_rect" contains android.graphics.Rect object containing drawing rectangle

    Returns IElement | Rect | T

    Value that was get from the element or null if the element doesn't exist.

getCleanerCopy

getMaxItemTransferAmount

  • Parameters

    Returns number

getMaxStackSize

  • getMaxStackSize(): number
  • Returns number

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • Returns boolean

isValidItem

  • isValidItem(id: number, count: number, data: number, extra: ItemExtraData): boolean
  • Parameters

    Returns boolean

onBindingUpdated

  • onBindingUpdated<T>(name: string, val: T): void
  • Type parameters

    • T

    Parameters

    • name: string
    • val: T

    Returns void

onDraw

  • onDraw(canvas: Canvas, scale: number): void
  • Parameters

    Returns void

onRelease

  • onRelease(): void
  • Returns void

onReset

  • onReset(): void
  • Returns void

onSetup

  • onSetup<T>(desc: T): void
  • Type parameters

    Parameters

    • desc: T

    Returns void

onTouchEvent

  • Parameters

    Returns void

onTouchReleased

  • Parameters

    Returns void

setBinding

  • setBinding<T>(bindingName: string, value: T): void
  • Passes any value to the element.


    Type parameters

    • T = any

    Parameters

    • bindingName: string

      binding name, you can access the value from the element by this name

    • value: T

      value to be passed to the element

    Returns void

setPosition

  • setPosition(x: number, y: number): void
  • Sets element's position in the window's unit coordinates.


    Parameters

    • x: number

      x position

    • y: number

      y position

    Returns void

setSize

  • setSize(width: number, height: number): void
  • Sets element's size in the window's unit coordinates.


    Parameters

    • width: number

      element's width

    • height: number

      element's height

    Returns void

setupInitialBindings

  • Parameters

    Returns void