Interface UICustomElement

There are 12 types of UI elements given by Inner Core, and you can also create your custom ones. Each element type has it's own specific description object. These description objects are all inherited from this BasicElementDescription. It means that each element must have coords on the GUI by X, Y, and additionally Z axis, and also you can specify how the element will behave when touched, in clicker object (optional).

interface UICustomElement {
    clicker?: UIClickEvent;
    custom?: {
        onBindingUpdated?: (<T>(element: ICustomElement, name: string, val: T) => void);
        onContainerInit?: ((element: ICustomElement, container: UiAbstractContainer, elementName: string) => void);
        onDraw?: ((element: ICustomElement, cvs: Canvas, scale: number) => void);
        onRelease?: ((element: ICustomElement) => void);
        onReset?: ((element: ICustomElement) => void);
        onSetup?: ((element: ICustomElement) => void);
        onTouchReleased?: ((element: ICustomElement) => void);
    };
    type: "custom";
    x?: number;
    y?: number;
    z?: number;
}

Hierarchy (view full)

Properties

clicker?: UIClickEvent
custom?: {
    onBindingUpdated?: (<T>(element: ICustomElement, name: string, val: T) => void);
    onContainerInit?: ((element: ICustomElement, container: UiAbstractContainer, elementName: string) => void);
    onDraw?: ((element: ICustomElement, cvs: Canvas, scale: number) => void);
    onRelease?: ((element: ICustomElement) => void);
    onReset?: ((element: ICustomElement) => void);
    onSetup?: ((element: ICustomElement) => void);
    onTouchReleased?: ((element: ICustomElement) => void);
}
type
x?: number
y?: number
z?: number

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