Interface 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.

interface IInvSlotElement {
    background: UI.Texture;
    cleaner: IElementCleaner;
    curCount: number;
    curData: number;
    curExtra: ItemExtraData;
    curId: number;
    description: object;
    descriptionWatcher: IScriptableWatcher;
    elementName: string;
    elementRect: Rect;
    isDarken: boolean;
    isDarkenAtZero: boolean;
    isDirty: boolean;
    isTouched: boolean;
    isVisual: boolean;
    maxStackSize: number;
    size: number;
    slotName: string;
    source: UiVisualSlotImpl;
    textOverride: string;
    window: Window;
    x: number;
    y: number;
    z: number;
    createTexture(obj: BitmapTypes): UI.Texture;
    debug(canvas: Canvas, scale: number): void;
    getBinding<T>(name: string): Rect | IElement | T;
    getCleanerCopy(): IElementCleaner;
    getMaxItemTransferAmount(slot: ISlotElement): number;
    getMaxStackSize(): number;
    invalidate(): void;
    isReleased(): boolean;
    isValidItem(id: number, count: number, data: number, extra: ItemExtraData): boolean;
    onBindingUpdated<T>(name: string, val: T): void;
    onDraw(canvas: Canvas, scale: number): void;
    onRelease(): void;
    onReset(): void;
    onSetup<T>(desc: T): void;
    onTouchEvent(event: ITouchEvent): void;
    onTouchReleased(event: ITouchEvent): void;
    setBinding<T>(bindingName: string, value: T): void;
    setPosition(x: number, y: number): void;
    setSize(width: number, height: number): void;
    setupInitialBindings(container: UiAbstractContainer, elementName: string): void;
}

Hierarchy (view full)

Methods

  • 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 Rect | IElement | T

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

  • 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

  • Sets element's position in the window's unit coordinates.

    Parameters

    • x: number

      x position

    • y: number

      y position

    Returns void

  • Sets element's size in the window's unit coordinates.

    Parameters

    • width: number

      element's width

    • height: number

      element's height

    Returns void

Properties

background: UI.Texture
curCount: number
curData: number
curExtra: ItemExtraData
curId: number
description: object
descriptionWatcher: IScriptableWatcher
elementName: string
elementRect: Rect
isDarken: boolean
isDarkenAtZero: boolean
isDirty: boolean
isTouched: boolean
isVisual: boolean
maxStackSize: number
size: number
slotName: string
textOverride: string
window: Window
x: number
y: number
z: number

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.