Перейти к основному содержанию

UI

Index

Classes

AdaptiveWindow

AdaptiveWindow:

Class representing several windows opened at the same. For example, UI.StandardWindow is a window group that consists of several separate windows.

constructor

closeOnBackPressed

closeOnBackPressed: boolean

addWindow

  • Creates a new window using provided description and adds it to the group.


    Parameters

    • name: string

      window name

    • content: WindowContent

      window description object

    Returns Window

    Created UI.Window object.

addWindowInstance

  • addWindowInstance(name: string, window: IWindow): void
  • Adds window instance with specified name to the group.


    Parameters

    • name: string

      window name

    • window: IWindow

      window to be added to the group

    Returns void

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getAllWindows

  • getAllWindows(): Collection<Window>

  • Returns Collection<Window>

    Collection object containing all the UI.Windows in the group.

getContainer


  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    Hashes containing string element name as keys and element instances as values.

getStyle


  • Returns Style

    Object containing current style of the window.

getWindow

  • getWindow(name: string): Window

  • Parameters

    • name: string

      window name

    Returns Window

    Window from the group by it's name or null if no window with such a name was added.

getWindowContent


  • Parameters

    • name: string

      window name

    Returns WindowContent

    Window's description object if a window with specified name exists or null otherwise.

getWindowNames

  • getWindowNames(): Collection<string>

  • Returns Collection<string>

    Collection object containing string names of the windows in the group.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

moveOnTop

  • moveOnTop(name: string): void
  • Moves window with specified name to the top of the group.


    Parameters

    • name: string

      window name

    Returns void

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window group can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

refreshAll

  • refreshAll(): void
  • Forces refresh for all windows.


    Returns void

refreshWindow

  • refreshWindow(name: string): void
  • Forces window refresh by it's name.


    Parameters

    • name: string

      name of the window to refresh

    Returns void

removeWindow

  • removeWindow(name: string): void
  • Removes window from group by it's name.


    Parameters

    • name: string

      window name

    Returns void

setBlockingBackground

  • setBlockingBackground(bb: boolean): void
  • Parameters

    • bb: boolean

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window group.


    Parameters

    • val: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setContent

setDebugEnabled

  • setDebugEnabled(enabled: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • enabled: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setForcedProfile

  • setForcedProfile(profile: 0 | 1): void
  • Forces UI.AdaptiveWindow to be displayed using some profile.


    Parameters

    • profile: 0 | 1

      0 for classic profile, 1 for default profile or -1 not to force any profile. By default forced profile is -1

    Returns void

setProfile

  • setProfile(profile: 0 | 1): void
  • Sets style profile for the current UI.AdaptiveWindow.


    Parameters

    • profile: 0 | 1

      0 for classic profile, 1 for default profile

    Returns void

setStyle

  • Parameters

    Returns void

setWindowContent

  • Sets content for the window by it's name.


    Parameters

    Returns void

ConfigVisualizer

ConfigVisualizer:

Class used to visualize configuration file contents in a simple way.

constructor

  • Constructs new UI.ConfigVisualizer instance with specified elements names prefix.


    Parameters

    • config: Config

      configuration file to be loaded

    • prefix: string

      elements names prefix used for this visualizer

    Returns ConfigVisualizer

clearVisualContent

createVisualContent

  • Creates elements in the window to visualize configuration file.


    Parameters

    Returns void

Container

Container:

Containers are used to properly manipulate windows and save slots contents and windows state between window opens. Every TileEntity has a built-in container that can be accessed as TileEntity.container.

@remarks

This is a legacy container that does not synchronize between clients and server. It should be used to store data on one side either server or client.

constructor

parent

parent: any

If container is a part of TileEntity, this field stores reference to it, otherwise null. You can also assign any value of any type to it using UI.Container.setParent method or using constructor parameter. Consider using UI.Container.getParent instead of direct field access.

slots

slots: {}

Type declaration

  • [slotName string]: Slot

tileEntity

tileEntity: any

staticreadonlyisContainer

isContainer: boolean

_addElement

  • _addElement(element: IElement, name: string): void
  • Parameters

    Returns void

_removeElement

  • _removeElement(name: string): void
  • Parameters

    • name: string

    Returns void

addElementInstance

  • addElementInstance(element: IElement, name: string): void
  • Parameters

    Returns void

applyChanges

  • applyChanges(): void
  • @deprecated

    Backwards compatibility.


    Returns void

asScriptableField

  • asScriptableField(): Slot[]

  • Returns Slot[]

    JS array of all slots.

clearSlot

  • clearSlot(name: string): void
  • Clears slot's contents.


    Parameters

    • name: string

      slot name

    Returns void

close

  • close(): void
  • Closes currently opened window.


    Returns void

dropAt

  • dropAt(x: number, y: number, z: number): void
  • Drops the contents of all the slots in the container on the specified coordinates and clears them.

    @deprecated

    Client only, use BlockSource.spawnDroppedItem instead.


    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

dropSlot

  • dropSlot(name: string, x: number, y: number, z: number): void
  • Drops slot's contents on the specified coordinates and clears the slot.

    @deprecated

    Client only, use BlockSource.spawnDroppedItem instead.


    Parameters

    • name: string

      slot name

    • x: number
    • y: number
    • z: number

    Returns void

getBinding

  • getBinding<T>(elementName: string, bindingName: string): IElement | Rect | T
  • Gets any value from the element.


    Type parameters

    • T = any

    Parameters

    • elementName: string

      element name

    • bindingName: 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.

getElement


  • Parameters

    • name: string

      element name

    Returns IElement

    Window's element by it's name.

getFieldSlot

  • getFieldSlot(slot: number): Slot
  • getFieldSlot(x: number, y: number): AbstractSlot

  • Parameters

    • slot: number

      slot index

    Returns Slot

    Workbench slot instance by slot index.

getFullSlot

  • getFullSlot(name: string): Slot
  • Gets the slot by it's name. If a slot with specified name doesn't exists, creates an empty one with specified name.


    Parameters

    • name: string

      slot name

    Returns Slot

    Contents of the slot in a FullSlot object containing more useful methods for slot manipulation.

getGuiContent


  • Returns WindowContent

    Window's content object (usually specified in the window's constructor) if a window was opened in the container, null otherwise.

getGuiScreen

getParent

  • getParent(): any
  • Getter for UI.Container.parent field.


    Returns any

getSlot

  • getSlot(name: string): Slot
  • Gets the slot by it's name. If a slot with specified name doesn't exists, creates an empty one with specified name.


    Parameters

    • name: string

      slot name

    Returns Slot

    Contents of the slot in a UI.Slot object. You can modify it to change the contents of the slot.

getSlotVisualImpl

  • Parameters

    • name: string

    Returns UiVisualSlotImpl

getText

  • getText(name: string): string

  • Parameters

    • name: string

      element name

    Returns string

    Value "text" binding, usually the text displayed on the element, or null if no element with specified name exist.

getValue

  • getValue(name: string): number

  • Parameters

    • name: string

      element name

    Returns number

    Value "value" binding, e.g. scale value, or null if no element with specified name exist.

getWindow


  • Returns IWindow

    Currently opened UI.IWindow or null if no window is currently opened in the container.

getWorkbenchFieldSize

  • getWorkbenchFieldSize(): number
  • @since

    2.2.1b106


    Returns number

    9 *

handleBindingDirty

  • handleBindingDirty(): void
  • Returns void

handleInventoryToSlotTransaction

  • handleInventoryToSlotTransaction(invSlot: number, slotName: string, amount: number): void
  • Parameters

    • invSlot: number
    • slotName: string
    • amount: number

    Returns void

handleSlotToInventoryTransaction

  • handleSlotToInventoryTransaction(slotName: string, amount: number): void
  • Parameters

    • slotName: string
    • amount: number

    Returns void

handleSlotToSlotTransaction

  • handleSlotToSlotTransaction(from: string, to: string, amount: number): void
  • Parameters

    • from: string
    • to: string
    • amount: number

    Returns void

invalidateUI

  • invalidateUI(onCurrentThread: boolean): void
  • invalidateUI(): void
  • Forces ui elements and drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateUIDrawing

  • invalidateUIDrawing(onCurrentThread: boolean): void
  • invalidateUIDrawing(): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateUIElements

  • invalidateUIElements(onCurrentThread: boolean): void
  • invalidateUIElements(): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isElementTouched

  • isElementTouched(name: string): boolean

  • Parameters

    • name: string

      element name

    Returns boolean

    true if the element is currently hovered.

isLegacyContainer

  • isLegacyContainer(): boolean

  • Returns boolean

    false if container supports multiplayer, true otherwise.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true, if some window is opened in the container.

onWindowClosed

  • onWindowClosed(): void
  • Returns void

openAs

  • Opens UI.IWindow object in the container.


    Parameters

    Returns void

refreshSlots

  • refreshSlots(): void
  • @deprecated

    Backwards compatibility.


    Returns void

sendChanges

  • sendChanges(): void
  • Returns void

setBinding

  • setBinding(elementName: string, bindingName: string, val: any): void
  • Passes any value to the element.


    Parameters

    • elementName: string

      element name

    • bindingName: string

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

    • val: any

      value to be passed to the element

    Returns void

setOnCloseListener

  • Sets an object to be notified when the window is closed.


    Parameters

    Returns void

setOnOpenListener

  • Sets an object to be notified when the window is opened.

    @since

    2.0.4b43


    Parameters

    Returns void

setParent

  • setParent(parent: any): void
  • Sets container's parent object, for TileEntity's container it should be a TileEntity reference, otherwise you can pass any value to be used in your code later.


    Parameters

    • parent: any

      an object to be set as container's parent

    Returns void

setScale

  • setScale(name: string, value: number): void
  • Sets "value" binding value for the element. Used to set scales values.


    Parameters

    • name: string

      element name

    • value: number

      value to be set for the element

    Returns void

setSlot

  • setSlot(name: string, id: number, count: number, data: number): void
  • setSlot(name: string, id: number, count: number, data: number, extra: ItemExtraData): void
  • Set slot's content by it's name. If a slot with specified name doesn't exists, creates an empty one with specified name and item.


    Parameters

    • name: string

      slot name

    • id: number
    • count: number
    • data: number

    Returns void

setText

  • setText(name: string, value: string | number): void
  • Sets "text" binding value for the element. Used to set element's text.


    Parameters

    • name: string

      element name

    • value: string | number

      value to be set for the element

    Returns void

setWbSlotNamePrefix

  • setWbSlotNamePrefix(wbsnp: string): void
  • If the container is a custom workbench, you can set the slot prefix via this method call. UI.Container.getFieldSlot will get field slot by prefix + slot name.


    Parameters

    • wbsnp: string

      custom workbench slot prefix

    Returns void

validateAll

  • validateAll(): void
  • Validates all the slots in the container.


    Returns void

validateSlot

  • validateSlot(name: string): void
  • Validates slot contents. If the data value is less then 0, it becomes 0, if ID is 0 or count is less then or equals to zero, slot is reset to an empty one.


    Parameters

    • name: string

      slot name

    Returns void

Font

Font:

Class representing font used in the UI.

constructor

  • Constructs new instance of the font with specified parameters.


    Parameters

    • color: number

      font color, android integer color value (produced by android.graphics.Color)

    • size: number

      font size

    • shadow: number

      shadow offset

    Returns Font

alignment

alignment: number

color

color: number

isBold

isBold: boolean

isCursive

isCursive: boolean

isUnderlined

isUnderlined: boolean

shadow

shadow: number

size

size: number

staticreadonlyALIGN_CENTER

ALIGN_CENTER: number

Aligns text to the start of the element (left for English locale).

staticreadonlyALIGN_CENTER_HORIZONTAL

ALIGN_CENTER_HORIZONTAL: number

Aligns text to the center of the element horizontally.

@since

2.2.1b96

staticreadonlyALIGN_DEFAULT

ALIGN_DEFAULT: number

Aligns text to the center of the element.

staticreadonlyALIGN_END

ALIGN_END: number

Aligns text to the end of the element (right for English locale).

asScriptable

drawText

  • drawText(canvas: Canvas, x: number, y: number, text: string, scale: number): void
  • Draws text on the canvas using created font.


    Parameters

    • canvas: Canvas

      android.graphics.Canvas instance to draw the text on

    • x: number

      x coordinate of the text in pixels

    • y: number

      x coordinate of the text in pixels

    • text: string

      text string to draw

    • scale: number

      additional scale to apply to the text

    Returns void

getBounds

  • getBounds(text: string, x: number, y: number, scale: number): Rect
  • Calculates bounds of the text given text position, text string and additional scale.


    Parameters

    • text: string
    • x: number
    • y: number
    • scale: number

    Returns Rect

    rect object containing calculated bounds of the text

getTextHeight

  • getTextHeight(text: string, x: number, y: number, scale: number): number
  • Calculates text height given text string and additional scale.


    Parameters

    • text: string
    • x: number
    • y: number
    • scale: number

    Returns number

    height of the specified string when painted with specified scale

getTextWidth

  • getTextWidth(text: string, scale: number): number
  • Calculates text width given text string and additional scale.


    Parameters

    • text: string
    • scale: number

    Returns number

    width of the specified string when painted with specified scale

FrameTextureSource

FrameTextureSource:

Namespace containing method to get FrameTexture instances.

constructor

staticget

  • Parameters

    • name: string

      gui texture name of the frame

    Returns FrameTexture

Slot

Slot:

constructor

  • Parameters

    • id: number
    • count: number
    • data: number

    Returns Slot

count

count: number

data

data: number

extra

id

id: number

drop

  • drop(x: number, y: number, z: number): void

getClassName

  • getClassName(): slot
  • Returns slot

getCount

  • getCount(): number
  • Returns number

getData

  • getData(): number
  • Returns number

getExtra

getExtraValue

  • getExtraValue(): number
  • Returns number

getId

  • getId(): number
  • Returns number

getInt

  • getInt(name: string): number
  • Parameters

    • name: string

    Returns number

getTarget

put

  • put(name: string, prop: any): void
  • Parameters

    • name: string
    • prop: any

    Returns void

save

set

  • set(id: number, count: number, data: number): void
  • set(id: number, count: number, data: number, extra: ItemExtraData): void
  • Parameters

    • id: number
    • count: number
    • data: number

    Returns void

validate

  • validate(): void
  • Returns void

StandardWindow

StandardWindow:

Class used to create standard UI for the mod's machines. UI.StandardWindow is a UI.WindowGroup that has three windows with names "main", "inventory" and "header". They represent custom window contents, player's inventory and window's header respectively.

@since

2.0.4b40

constructor

  • Constructs new UI.StandardWindow with specified content. Content is applied to the main window, header and inventory remain the same.


    Parameters

    Returns StandardWindow

closeOnBackPressed

closeOnBackPressed: boolean

addWindow

  • Creates a new window using provided description and adds it to the group.


    Parameters

    • name: string

      window name

    • content: WindowContent

      window description object

    Returns Window

    Created UI.Window object.

addWindowInstance

  • addWindowInstance(name: string, window: IWindow): void
  • Adds window instance with specified name to the group.


    Parameters

    • name: string

      window name

    • window: IWindow

      window to be added to the group

    Returns void

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getAllWindows

  • getAllWindows(): Collection<Window>

  • Returns Collection<Window>

    Collection object containing all the UI.Windows in the group.

getContainer


  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    Hashes containing string element name as keys and element instances as values.

getStyle


  • Returns Style

    Object containing current style of the window.

getStyleSafe

getWindow

  • getWindow(name: string): Window

  • Parameters

    • name: string

      window name

    Returns Window

    Window from the group by it's name or null if no window with such a name was added.

getWindowContent


  • Parameters

    • name: string

      window name

    Returns WindowContent

    Window's description object if a window with specified name exists or null otherwise.

getWindowNames

  • getWindowNames(): Collection<string>

  • Returns Collection<string>

    Collection object containing string names of the windows in the group.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

moveOnTop

  • moveOnTop(name: string): void
  • Moves window with specified name to the top of the group.


    Parameters

    • name: string

      window name

    Returns void

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window group can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

refreshAll

  • refreshAll(): void
  • Forces refresh for all windows.


    Returns void

refreshWindow

  • refreshWindow(name: string): void
  • Forces window refresh by it's name.


    Parameters

    • name: string

      name of the window to refresh

    Returns void

removeWindow

  • removeWindow(name: string): void
  • Removes window from group by it's name.


    Parameters

    • name: string

      window name

    Returns void

setBlockingBackground

  • setBlockingBackground(bb: boolean): void
  • Parameters

    • bb: boolean

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window group.


    Parameters

    • val: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setContent

setDebugEnabled

  • setDebugEnabled(enabled: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • enabled: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setStyle

  • Parameters

    Returns void

setWindowContent

  • Sets content for the window by it's name.


    Parameters

    Returns void

StandartWindow

StandartWindow:

Legacy misspelled standard UI, which is works under classic styling and must be used only in unsupported mods.

@deprecated

In 2.0.4b40, use UI.StandardWindow instead.

constructor

  • Constructs new UI.StandartWindow with specified content. Content is applied to the main window, header and inventory remain the same.


    Parameters

    Returns StandartWindow

closeOnBackPressed

closeOnBackPressed: boolean

addWindow

  • Creates a new window using provided description and adds it to the group.


    Parameters

    • name: string

      window name

    • content: WindowContent

      window description object

    Returns Window

    Created UI.Window object.

addWindowInstance

  • addWindowInstance(name: string, window: IWindow): void
  • Adds window instance with specified name to the group.


    Parameters

    • name: string

      window name

    • window: IWindow

      window to be added to the group

    Returns void

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getAllWindows

  • getAllWindows(): Collection<Window>

  • Returns Collection<Window>

    Collection object containing all the UI.Windows in the group.

getContainer


  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    Hashes containing string element name as keys and element instances as values.

getStyle


  • Returns Style

    Object containing current style of the window.

getStyleSafe

  • Returns Style

getWindow

  • getWindow(name: string): Window

  • Parameters

    • name: string

      window name

    Returns Window

    Window from the group by it's name or null if no window with such a name was added.

getWindowContent


  • Parameters

    • name: string

      window name

    Returns WindowContent

    Window's description object if a window with specified name exists or null otherwise.

getWindowNames

  • getWindowNames(): Collection<string>

  • Returns Collection<string>

    Collection object containing string names of the windows in the group.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

moveOnTop

  • moveOnTop(name: string): void
  • Moves window with specified name to the top of the group.


    Parameters

    • name: string

      window name

    Returns void

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window group can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

refreshAll

  • refreshAll(): void
  • Forces refresh for all windows.


    Returns void

refreshWindow

  • refreshWindow(name: string): void
  • Forces window refresh by it's name.


    Parameters

    • name: string

      name of the window to refresh

    Returns void

removeWindow

  • removeWindow(name: string): void
  • Removes window from group by it's name.


    Parameters

    • name: string

      window name

    Returns void

setBlockingBackground

  • setBlockingBackground(bb: boolean): void
  • Parameters

    • bb: boolean

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window group.


    Parameters

    • val: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setContent

setDebugEnabled

  • setDebugEnabled(enabled: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • enabled: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setStyle

  • Parameters

    Returns void

setWindowContent

  • Sets content for the window by it's name.


    Parameters

    Returns void

Style

Style:

Object representing window style. Window styles allows to customize the way your windows look like.

constructor

staticreadonlyCLASSIC

CLASSIC: Style

Classic (0.16.*-like) windows style, which also used before legacy version.

staticreadonlyDEFAULT

DEFAULT: Style

Default windows style.

staticreadonlyLEGACY

LEGACY: Style

addAllBindings

addBinding

  • addBinding(key: string, name: string): void
  • Adds gui texture name to use for the specified window part.


    Parameters

    • key: string

      binding name

    • name: string

      gui texture name

    Returns void

addStyle

  • addStyle(style: Style): void
  • Adds an additional style object to the current style.


    Parameters

    • style: Style

      additional style object to be added

    Returns void

copy


  • Returns Style

    A copy of the current style. Only style bindings of the current style are copied, no parent/additional styles are copied.

getAllBindingNames

  • getAllBindingNames(): Collection<string>

  • Returns Collection<string>

    Collection containing all binding names from the current style object.

getBinding

  • getBinding(key: string, fallback: string): string
  • Gets texture binding bt it's name. Searches first in the additional styles, then in the current style, then in all it's parents.


    Parameters

    • key: string

      binding name

    • fallback: string

      value to return on binding failure

    Returns string

    Ui texture name if current object, additional styles or one of the parents contains such a binding name, fallback otherwise.

getBitmapName

  • getBitmapName(name: string): string
  • If name is a style value (starts with "style:"), returns corresponding gui texture name, else returns input string.


    Parameters

    • name: string

      style value or bitmap name

    Returns string

getBooleanProperty

  • getBooleanProperty(name: string, fallback: boolean): boolean
  • Parameters

    • name: string
    • fallback: boolean

    Returns boolean

getDoubleProperty

  • getDoubleProperty(name: string, fallback: number): number
  • Parameters

    • name: string
    • fallback: number

    Returns number

getFloatProperty

  • getFloatProperty(name: string, fallback: number): number
  • Parameters

    • name: string
    • fallback: number

    Returns number

getIntProperty

  • getIntProperty(name: string, fallback: number): number
  • Parameters

    • name: string
    • fallback: number

    Returns number

getStringProperty

  • getStringProperty(name: string, fallback: string): string
  • Parameters

    • name: string
    • fallback: string

    Returns string

inherit

  • inherit(style: Style): void
  • Specifies parent style object for the current style.


    Parameters

    • style: Style

      style to be set as parent

    Returns void

setProperty

  • setProperty(name: string, value: any): void
  • Parameters

    • name: string
    • value: any

    Returns void

staticgetBitmapByDescription

TabbedWindow

TabbedWindow:

Class used to create windows with multiple tabs.

constructor

closeOnBackPressed

closeOnBackPressed: boolean

currentTab

currentTab: number

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getContainer


  • Returns UiAbstractContainer

    New UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent


  • Returns TabbedWindowContent

    Window's content object (usually specified in the window's constructor).

getDefaultTab

  • getDefaultTab(): number

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    HashMap containing string element name as keys and element instances as values.

getGlobalTabSize

  • getGlobalTabSize(): number

  • Returns number

    Tab selector window width in global units.

getInnerWindowHeight

  • getInnerWindowHeight(): number

  • Returns number

    Tab content window height in units.

getInnerWindowWidth

  • getInnerWindowWidth(): number

  • Returns number

    Tab content window width in units.

getStyle


  • Returns Style

    Object containing current style of the window.

getStyleSafe

  • @deprecated

    Same as getStyle, meant to override fallback default style, but never properly used.


    Returns Style

getWindowForTab

  • getWindowForTab(index: number): Window

  • Parameters

    • index: number

      index of the tab

    Returns Window

    New UI.Window instance created for the specified tab or null if no window was created for specified window.

getWindowTabSize

  • getWindowTabSize(): number

  • Returns number

    Tab selector window width in units.

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window can be closed on pressing back navigation button.

onTabSelected

  • onTabSelected(index: number): void
  • Parameters

    • index: number

    Returns void

open

  • open(): void
  • Opens window without container.


    Returns void

setBlockingBackground

  • setBlockingBackground(enabled: boolean): void
  • Specifies whether the window should darken and block background.


    Parameters

    • enabled: boolean

      pass true if you want the window to block background

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(cobp: boolean): void
  • Parameters

    • cobp: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setDebugEnabled

  • setDebugEnabled(debug: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • debug: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setDefaultTab

  • setDefaultTab(tab: number): void
  • Sets default tab index.


    Parameters

    • tab: number

      index of the tab to be opened by default

    Returns void

setEventListener

  • Sets listener to be notified about window opening/closing events.


    Parameters

    Returns void

setFakeTab

  • setFakeTab(index: number, tabOverlay: ElementSet): void
  • Creates fake tab with no content.


    Parameters

    Returns void

setLocation

  • Sets window location (bounds) to draw window within.


    Parameters

    Returns void

setStyle

  • Sets new style object as current window's style. If the new style is a different object then an old one, forces window invalidation.


    Parameters

    Returns void

setTab

  • Sets content of the tab.

    @remarks

    The location of the tabs is as follows:

    0    6
    1 7
    2 8
    3 9
    4 10
    5 11

    Parameters

    • index: number

      index of the tab; there are 12 tabs available, from 0 to 11

    • tabOverlay: ElementSet

      content of the tab selector

    • tabContent: WindowContent

      content of the window to be created for the tab

    • isAlwaysSelected: boolean

      if true, tab is always displayed as selected; default value is false

    Returns void

setTabEventListener

  • Sets listener to be notified about tab with specified index opening/closing events.


    Parameters

    Returns void

Texture

Texture:

Class representing static or animated texture.

constructor

  • Constructs new static Texture with specified bitmap.


    Parameters

    • bitmap: Bitmap

      android.graphics.Bitmap instance

    Returns Texture

animation

animation: IBitmapWrap[]

bitmap

bitmap: IBitmapWrap

delay

delay: number

isAnimation

isAnimation: boolean

draw

  • draw(canvas: Canvas, x: number, y: number, scale: number): void
  • Parameters

    • canvas: Canvas
    • x: number
    • y: number
    • scale: number

    Returns void

drawCutout

  • drawCutout(canvas: Canvas, cutout: RectF, x: number, y: number, scale: number): void
  • Parameters

    • canvas: Canvas
    • cutout: RectF
    • x: number
    • y: number
    • scale: number

    Returns void

fitAllToOneSize

  • fitAllToOneSize(): void
  • Resizes all the frames to match the first one.


    Returns void

getBitmap

  • getBitmap(frame: number): Bitmap

  • Parameters

    • frame: number

      frame number

    Returns Bitmap

    Bitmap object containing animation frame for the corresponding frame number.

getBitmapWrap

getFrame

  • getFrame(): number

  • Returns number

    Frame number of the animation corresponding to current system time.

getHeight

  • getHeight(): number

  • Returns number

    Height of the texture in pixels.

getWidth

  • getWidth(): number

  • Returns number

    Width of the texture in pixels.

isAnimated

  • isAnimated(): boolean
  • Returns boolean

readOffset

  • readOffset(obj: { x?: number; y?: number }): void
  • Sets texture offsets in pixels from the upper left bound of the bitmap.


    Parameters

    • obj: { x?: number; y?: number }
      • optionalx: number
      • optionaly: number

    Returns void

release

  • release(): void
  • Releases all allocated resources, should be called when the texture is not longer needed.


    Returns void

rescaleAll

  • rescaleAll(scale: number): void
  • Resizes all the frames by constant scale multiplier.


    Parameters

    • scale: number

      scale to modify the frames by

    Returns void

resizeAll

  • resizeAll(width: number, height: number): void
  • Resizes all the frames of the texture to the specified size.


    Parameters

    • width: number
    • height: number

    Returns void

TextureSource

TextureSource:

Namespace containing methods used to get and add gui textures.

constructor

staticget

  • get(name: string): Bitmap

  • Parameters

    • name: string

      gui texture name

    Returns Bitmap

    Bitmap instance with the ui texture, if it was loaded, with "missing_texture" texture otherwise.

staticgetNullable

  • getNullable(name: string): Bitmap

  • Parameters

    • name: string

      gui texture name

    Returns Bitmap

    Bitmap instance with the ui texture, if it was loaded, null otherwise.

staticput

  • put(name: string, bitmap: Bitmap): void
  • Adds any bitmap as a gui texture with specified name.


    Parameters

    • name: string

      gui texture name

    • bitmap: Bitmap

      android.graphics.Bitmap instance to be used as gui texture

    Returns void

Window

Window:

Represents window of required size that can be opened in container to provide any required UI facilities.

constructor

  • Constructs new UI.Window object with specified bounds.


    Parameters

    • location: WindowLocation

      object containing window's bounds. Note that the bounds change the width of the window, but the full width of the window becomes 1000 units.

    Returns Window

closeOnBackPressed

closeOnBackPressed: boolean

content

content: WindowContent

elementProvider

elementProvider: IElementProvider

elementView

elementView: ImageView

isBackgroundDirty

isBackgroundDirty: boolean

isForegroundDirty

isForegroundDirty: boolean

layout

layout: ViewGroup

location

location: WindowLocation

addAdjacentWindow

  • addAdjacentWindow(window: Window): void
  • Adds another window as adjacent window, so that several windows open at the same time. This allows to divide window into separate parts and treat them separately.


    Parameters

    • window: Window

      another window to be added as adjacent

    Returns void

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

debug

  • debug(): void
  • Writes debug information about current window to the log.


    Returns void

forceRefresh

  • forceRefresh(): void
  • Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getBackgroundProvider

  • getBackgroundProvider<T>(): T

getContainer


  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent


  • Returns WindowContent

    Window's content object (usually specified in the window's constructor).

getContentProvider

getElementProvider

  • getElementProvider<T>(): T

getElements

  • getElements(): HashMap<String, IElement>
  • Gets all the elements in the window.


    Returns HashMap<String, IElement>

    Hashes containing string element names as keys and element instances as values.

getEventListener

  • Gets listener to be notified about window opening/closing events.

    @since

    2.3.1b116


    Returns WindowEventListener

getLocation

getParentWindow


  • Returns IWindow

    Current window's parent window.

getProperty

  • getProperty<T>(name: string): T
  • Gets custom property by it's name. Custom properties can be used to store some values containing window's current state. Note that these properties are not saved between Inner Core launches.


    Type parameters

    • T

    Parameters

    • name: string

      custom property name

    Returns T

    Value set by UI.Window.putProperty or null if no value was specified for this name.

getScale

  • getScale(): number

  • Returns number

    Unit size (in pixel) in the window's bounds.

getStyle


  • Returns Style

    Object containing current style of the window.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

invalidateBackground

  • invalidateBackground(): void
  • Returns void

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateForeground

  • invalidateForeground(): void
  • Returns void

isBlockingBackground

  • isBlockingBackground(): boolean

  • Returns boolean

    true if window blocks background.

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isNotFocusable

  • isNotFocusable(): boolean

  • Returns boolean

    true if the window is game overlay, false otherwise.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

isTouchable

  • isTouchable(): boolean

  • Returns boolean

    true if the window is touchable, false otherwise.

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

postBackgroundRefresh

  • postBackgroundRefresh(): void
  • Returns void

postElementRefresh

  • postElementRefresh(): void
  • Returns void

postOpen

  • postOpen(): void
  • Returns void

preOpen

  • preOpen(): void
  • Returns void

putProperty

  • putProperty<T>(name: string, value: T): void
  • Sets custom property value.


    Type parameters

    • T

    Parameters

    • name: string

      custom property name

    • value: T

      custom property value

    Returns void

removeAdjacentWindow

  • removeAdjacentWindow(window: Window): void
  • Removes adjacent window from the adjacent windows list.


    Parameters

    • window: Window

      another window that was added as adjacent

    Returns void

runCachePreparation

  • runCachePreparation(async: boolean): void
  • Parameters

    • async: boolean

    Returns void

setAsGameOverlay

  • setAsGameOverlay(inGameOverlay: boolean): void
  • Allows window to be displayed as game overlay without blocking Minecraft sounds. Note that this drops window's FPS.


    Parameters

    • inGameOverlay: boolean

      if true, the window is opened in PopupWindow to avoid blocking Minecraft sounds

    Returns void

setBackgroundColor

  • setBackgroundColor(color: number): void
  • Set background color of window.


    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns void

setBlockingBackground

  • setBlockingBackground(blockingBackground: boolean): void
  • Specifies whether the window should darken and block background.


    Parameters

    • blockingBackground: boolean

      pass true if you want the window to block background

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window.


    Parameters

    • val: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via it. UI.Container.openAs call


    Parameters

    Returns void

setContent

  • Specifies the content of the window.


    Parameters

    Returns void

setDebugEnabled

  • setDebugEnabled(enabled: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • enabled: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setDynamic

  • setDynamic(dynamic: boolean): void
  • Parameters

    • dynamic: boolean

      specify true, if the window contains dynamic (animated) elements, false otherwise. By default all windows are dynamic. Make them static for better performance

    Returns void

setEventListener

  • Sets listener to be notified about window opening/closing events.


    Parameters

    Returns void

setInventoryNeeded

  • setInventoryNeeded(inventoryNeeded: boolean): void

  • Parameters

    • inventoryNeeded: boolean

      specify true if the window requires player's inventory

    Returns void

setParentWindow

  • setParentWindow(parent: IWindow): void
  • Sets any window as current window's parent. If current window closes, parent window closes too.


    Parameters

    • parent: IWindow

      window to be used as parent window for the current window.

    Returns void

setStyle

  • Overrides style properties of the current style by the values specified in the style parameter.


    Parameters

    • style: BindingSet

      js object where keys represent binding names and values represent texture gui names

    Returns void

setTouchable

  • setTouchable(touchable: boolean): void
  • Specifies whether touch events should be handled by this window or passed to underlying windows (to the game). By default all windows are touchable.


    Parameters

    • touchable: boolean

      pass true if the window should handle touch events, false otherwise

    Returns void

updateScrollDimensions

  • updateScrollDimensions(): void
  • @since

    2.2.1b96


    Returns void

updateWindowLocation

  • updateWindowLocation(): void
  • Returns void

updateWindowPositionAndSize

  • updateWindowPositionAndSize(): void
  • @since

    2.2.1b96


    Returns void

WindowGroup

WindowGroup:

Class representing several windows opened at the same. For example, UI.StandardWindow is a window group that consists of several separate windows.

constructor

closeOnBackPressed

closeOnBackPressed: boolean

addWindow

  • Creates a new window using provided description and adds it to the group.


    Parameters

    • name: string

      window name

    • content: WindowContent

      window description object

    Returns Window

    Created UI.Window object.

addWindowInstance

  • addWindowInstance(name: string, window: IWindow): void
  • Adds window instance with specified name to the group.


    Parameters

    • name: string

      window name

    • window: IWindow

      window to be added to the group

    Returns void

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getAllWindows

  • getAllWindows(): Collection<Window>

  • Returns Collection<Window>

    Collection object containing all the UI.Windows in the group.

getContainer


  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    Hashes containing string element name as keys and element instances as values.

getStyle


  • Returns Style

    Object containing current style of the window.

getWindow

  • getWindow(name: string): Window

  • Parameters

    • name: string

      window name

    Returns Window

    Window from the group by it's name or null if no window with such a name was added.

getWindowContent


  • Parameters

    • name: string

      window name

    Returns WindowContent

    Window's description object if a window with specified name exists or null otherwise.

getWindowNames

  • getWindowNames(): Collection<string>

  • Returns Collection<string>

    Collection object containing string names of the windows in the group.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

moveOnTop

  • moveOnTop(name: string): void
  • Moves window with specified name to the top of the group.


    Parameters

    • name: string

      window name

    Returns void

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window group can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

refreshAll

  • refreshAll(): void
  • Forces refresh for all windows.


    Returns void

refreshWindow

  • refreshWindow(name: string): void
  • Forces window refresh by it's name.


    Parameters

    • name: string

      name of the window to refresh

    Returns void

removeWindow

  • removeWindow(name: string): void
  • Removes window from group by it's name.


    Parameters

    • name: string

      window name

    Returns void

setBlockingBackground

  • setBlockingBackground(bb: boolean): void
  • Parameters

    • bb: boolean

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window group.


    Parameters

    • val: boolean

    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setDebugEnabled

  • setDebugEnabled(enabled: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • enabled: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

setStyle

  • Parameters

    Returns void

setWindowContent

  • Sets content for the window by it's name.


    Parameters

    Returns void

WindowLocation

WindowLocation:

Class representing window's location. All coordinates are defined in units (given screen's width is 1000 units).

constructor

forceScrollX

forceScrollX: boolean

forceScrollY

forceScrollY: boolean

globalScale

globalScale: boolean

Determines whether the interface needs to be resized based on its size or a global unit system should be used.

@since

2.3.1b115

height

height: number

Window height.

scale

scale: number

Window scale.

scrollX

scrollX: number

Horizontal window scroll.

scrollY

scrollY: number

Vertical window scroll.

width

width: number

Window width.

x

x: number

Window horizontal position.

y

y: number

Window vertical position.

zIndex

zIndex: number

Window position on layers.

staticreadonlyPADDING_BOTTOM

PADDING_BOTTOM: number

Constant used to represent bottom padding.

staticreadonlyPADDING_LEFT

PADDING_LEFT: number

Constant used to represent left padding.

staticreadonlyPADDING_RIGHT

PADDING_RIGHT: number

Constant used to represent right padding.

staticreadonlyPADDING_TOP

PADDING_TOP: number

Constant used to represent top padding.

asScriptable


  • Returns IWindowLocation

    Window location as a js object. Note that paddings are not included into the object.

copy

getDrawingScale

  • getDrawingScale(): number

  • Returns number

    Unit size (in pixels) in the window's bounds.

getLayoutParams

  • getLayoutParams(a1: number, a2: number, a3: number): LayoutParams
  • Parameters

    • a1: number
    • a2: number
    • a3: number

    Returns LayoutParams

getRect

  • getRect(): Rect

  • Returns Rect

    Window's rectangle in the android.graphics.Rect object.

getScale

  • getScale(): number

  • Returns number

    Unit size (in pixels) in the fullscreen context (<screen width> / 1000).

getWindowHeight

  • getWindowHeight(): number

  • Returns number

    Window's height in units.

getWindowWidth

  • getWindowWidth(): 1000

  • Returns 1000

    Window's width in units (always 1000 by definition of the unit).

globalToWindow

  • globalToWindow(val: number): number
  • Transforms dimension in fullscreen units to the dimension within window's bounds.


    Parameters

    • val: number

      value to be transformed

    Returns number

removeScroll

  • removeScroll(): void
  • Sets window's scroll size to the windows size to remove scroll.


    Returns void

set

  • set(x: number, y: number, width: number, height: number): void
  • set(location: WindowLocation): void
  • Sets window location parameters.


    Parameters

    • x: number

      X coordinate of the window

    • y: number

      Y coordinate of the window

    • width: number

      width of the window

    • height: number

      height of the window

    Returns void

setPadding

  • setPadding(padding: 0 | 1 | 2 | 3, value: number): void
  • setPadding(top: number, bottom: number, left: number, right: number): void

setScroll

  • setScroll(x: number, y: number): void
  • Sets scrollable window size. Should be greater then window width/height for the changes to take effect.


    Parameters

    • x: number

      scrollable window size along the X axis

    • y: number

      scrollable window size along the Y axis

    Returns void

setSize

  • setSize(x: number, y: number): void
  • Sets the size of the window.


    Parameters

    • x: number

      window's width

    • y: number

      window's height

    Returns void

setZ

  • setZ(z: number): void
  • Sets window's Z index. Z index determines how the window will be displayed when several windows are open.


    Parameters

    • z: number

      window Z index

    Returns void

setupAndShowPopupWindow

  • setupAndShowPopupWindow(win: PopupWindow): void
  • Parameters

    • win: PopupWindow

    Returns void

showPopupWindow

  • showPopupWindow(win: PopupWindow): void
  • Parameters

    • win: PopupWindow

    Returns void

updatePopupWindow

  • updatePopupWindow(win: PopupWindow): void
  • Parameters

    • win: PopupWindow

    Returns void

windowToGlobal

  • windowToGlobal(val: number): number
  • Transforms dimension within window's bounds to the dimension in fullscreen units.


    Parameters

    • val: number

      value to be transformed

    Returns number

Interfaces

AbstractSlot

AbstractSlot:

getCount

  • getCount(): number
  • Returns number

getData

  • getData(): number
  • Returns number

getExtra

getId

  • getId(): number
  • Returns number

set

  • set(id: number, count: number, data: number, extra: ItemExtraData): void
  • Parameters

    Returns void

validate

  • validate(): void
  • Returns void

ColorDrawing

ColorDrawing:

optionalcolor

color?: number

optionalcolorMode

colorMode?: number

optionalmode

mode?: number

type

type: background

CustomDrawing

CustomDrawing:

optionalonDraw

onDraw?: (canvas: Canvas, scale: number) => void

Type declaration

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

      • canvas: Canvas
      • scale: number

      Returns void

type

type: custom

DrawColor

DrawColor:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

DrawCustom

DrawCustom:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

DrawFrame

DrawFrame:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

DrawImage

DrawImage:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

DrawLine

DrawLine:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

  • Parameters

    Returns void

DrawText

DrawText:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

  • Parameters

    Returns void

ElementSet

ElementSet:

FontDescription

FontDescription:

Object containing font parameters. If no color, size and shadow are specified, default values are ignored and white font with text size 20, white color and 0.45 shadow is created.

optionalalign

align?: number

Same as alignment.

optionalalignment

alignment?: number

Font alignment, one of the UI.Font.ALIGN_DEFAULT, UI.Font.ALIGN_CENTER, UI.Font.ALIGN_END constants.

optionalbold

bold?: boolean = false

If true, the font is bold, false otherwise.

optionalcolor

color?: number = 0x000 // black

Font color, android integer color value (produced by android.graphics.Color).

optionalcursive

cursive?: boolean = false

If true, the font is italic, false otherwise.

optionalshadow

shadow?: number = 0 // no shadow

Font shadow offset.

optionalsize

size?: number = 20

Font size.

optionalunderline

underline?: boolean = false

If true, the font is underlined, false otherwise.

FrameDrawing

FrameDrawing:

optionalbg

bg?: number

optionalbitmap

bitmap?: string

optionalcolor

color?: number

optionalheight

height?: number

optionalscale

scale?: number

optionalsides

sides?: boolean[]

type

type: frame

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

FrameTexture

FrameTexture:

Object used to manipulate frame textures.

readonlyCORNER_BOTTOM_LEFT

CORNER_BOTTOM_LEFT: number

Specifies bottom left corner of the frame.

readonlyCORNER_BOTTOM_RIGHT

CORNER_BOTTOM_RIGHT: number

Specifies bottom right corner of the frame.

readonlyCORNER_TOP_LEFT

CORNER_TOP_LEFT: number

Specifies top left corner of the frame.

readonlyCORNER_TOP_RIGHT

CORNER_TOP_RIGHT: number

Specifies top right corner of the frame.

readonlySIDE_BOTTOM

SIDE_BOTTOM: number

Specifies bottom side of the frame.

readonlySIDE_LEFT

SIDE_LEFT: number

Specifies left side of the frame.

readonlySIDE_RIGHT

SIDE_RIGHT: number

Specifies right side of the frame.

readonlySIDE_TOP

SIDE_TOP: number

Specifies top side of the frame.

draw

  • draw(canvas: Canvas, rect: RectF, scale: number, color: number, sides: [boolean, boolean, boolean, boolean]): void
  • Parameters

    • canvas: Canvas
    • rect: RectF
    • scale: number
    • color: number
    • sides: [boolean, boolean, boolean, boolean]

    Returns void

expand

  • expand(width: number, height: number, color: number, sides: [boolean, boolean, boolean, boolean]): Bitmap
  • expand(width: number, height: number, color: number): Bitmap
  • Expands texture to the specified side, filling the middle with specified color.


    Parameters

    • width: number
    • height: number
    • color: number

      integer color value produced by android.graphics.Color class

    • sides: [boolean, boolean, boolean, boolean]

      array of booleans marking whether the side should be expanded or not. The order of the sides is FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN

    Returns Bitmap

    Expanded android.graphics.Bitmap instance with the frame.

expandAndScale

  • expandAndScale(width: number, height: number, scale: number, color: number, sides: [boolean, boolean, boolean, boolean]): Bitmap
  • expandAndScale(width: number, height: number, scale: number, color: number): Bitmap
  • Expands texture to the specified side, filling the middle with specified color.


    Parameters

    • width: number
    • height: number
    • scale: number

      scale of the created bitmap

    • color: number

      integer color value produced by android.graphics.Color class

    • sides: [boolean, boolean, boolean, boolean]

      array of booleans marking whether the side should be expanded or not. See UI.FrameTexture.expand parameters for details. Default behavior is to scale all sides

    Returns Bitmap

    Expanded and scaled android.graphics.Bitmap instance.

expandSide

  • expandSide(sideId: number, pixels: number): Bitmap
  • Expands side of the texture by specified amount of pixels.


    Parameters

    • sideId: number

      side of the texture, one of the FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN constants

    • pixels: number

    Returns Bitmap

    Expanded android.graphics.Bitmap instance with the frame.

getCentralColor

  • getCentralColor(): number

  • Returns number

    Object packed integer color value of the central pixel of the source texture.

getSideSource

  • getSideSource(side: number): Bitmap

  • Parameters

    • side: number

      side of the texture, one of the FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN constants

    Returns Bitmap

    Texture side source extracted from the original frame texture source stored in android.graphics.Bitmap instance.

getSource

  • getSource(): Bitmap

  • Returns Bitmap

    Original frame texture source stored in android.graphics.Bitmap instance.

FrameTextureSides

FrameTextureSides:

optionaldown

down?: boolean

optionalleft

left?: boolean

optionalright

right?: boolean

optionalup

up?: boolean

IBackgroundProvider

IBackgroundProvider:

addDrawing

  • Parameters

    Returns void

clearAll

  • clearAll(): void
  • Returns void

prepareCache

  • prepareCache(): void
  • Returns void

releaseCache

  • releaseCache(): void
  • Returns void

setBackgroundColor

  • setBackgroundColor(color: number): void
  • Parameters

    • color: number

    Returns void

IBitmapWrap

IBitmapWrap:

readonlyMISSING_BITMAP

MISSING_BITMAP: Bitmap

get

  • get(): Bitmap
  • Returns Bitmap

getConfig

  • getConfig(): Config
  • Returns Config

getHeight

  • getHeight(): number
  • Returns number

getResizedCache

  • getResizedCache(width: number, height: number): Bitmap
  • Parameters

    • width: number
    • height: number

    Returns Bitmap

getStackPos

  • getStackPos(): number
  • Returns number

getWidth

  • getWidth(): number
  • Returns number

isRecycled

  • isRecycled(): boolean
  • Returns boolean

recycle

  • recycle(): void
  • Returns void

removeCache

  • removeCache(): void
  • Returns void

resize

restore

  • restore(): boolean
  • Returns boolean

restoreIfNeeded

  • restoreIfNeeded(): void
  • Returns void

store

  • store(): boolean
  • Returns boolean

storeIfNeeded

  • storeIfNeeded(): void
  • Returns void

wrap

IButtonElement

IButtonElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • Returns boolean

onBindingUpdated

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

    • T

    Parameters

    • name: string
    • value: T

    Returns void

onDraw

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

    • canvas: Canvas
    • scale: number

    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

ICloseButtonElement

ICloseButtonElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • Returns boolean

onBindingUpdated

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

    • T

    Parameters

    • name: string
    • value: T

    Returns void

onDraw

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

    • canvas: Canvas
    • scale: number

    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

IContentProvider

IContentProvider:

content

content: WindowContent

drawing

drawing: object

drawingWatcher

drawingWatcher: IScriptableWatcher

elementMap

elementMap: HashMap<string, IElement>

elements

elements: object

window

window: Window

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

refreshDrawing

  • refreshDrawing(): void
  • Returns void

refreshElements

  • refreshElements(): void
  • Returns void

setContentObject

setupDrawing

  • setupDrawing(): void
  • Returns void

setupElements

  • setupElements(): void
  • Returns void

ICustomElement

ICustomElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

getScope

  • getScope(): object
  • Returns object

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

IDrawing

IDrawing:

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onSetup

  • onSetup(scriptable: object, style: Style): void
  • Parameters

    • scriptable: object
    • style: Style

    Returns void

IElement

IElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • Returns boolean

onBindingUpdated

  • onBindingUpdated<T>(str: string, obj: T): void
  • Type parameters

    • T

    Parameters

    • str: string
    • obj: T

    Returns void

onDraw

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

    • canvas: Canvas
    • scale: number

    Returns void

onRelease

  • onRelease(): void
  • Returns void

onReset

  • onReset(): void
  • Returns void

onSetup

  • onSetup<T>(descr?: T): void
  • Type parameters

    Parameters

    • optionaldescr: T

    Returns void

onTouchEvent

onTouchReleased

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

IElementCleaner

IElementCleaner:

element

element: IElement

rect

rect: Rect

clean

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

    • canvas: Canvas
    • scale: number

    Returns void

clone

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

set

  • set(rect: Rect): void
  • Parameters

    • rect: Rect

    Returns void

IElementProvider

IElementProvider:

addOrRefreshElement

  • addOrRefreshElement(element: IElement): void

getStyleFor

invalidateAll

  • invalidateAll(): void
  • Returns void

releaseAll

  • releaseAll(): void
  • Returns void

removeElement

resetAll

  • resetAll(): void
  • Returns void

runCachePreparation

  • runCachePreparation(): void
  • Returns void

setBackgroundProvider

setWindowStyle

  • setWindowStyle(style: Style): void
  • Parameters

    Returns void

IFPSTextElement

IFPSTextElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

IFrameElement

IFrameElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

IImageElement

IImageElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

height

height: number

isDirty

isDirty: boolean

isTouched

isTouched: boolean

overlay

overlay: Texture

texture

texture: Texture

textureScale

textureScale: number

width

width: number

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isAnimated

  • isAnimated(): boolean
  • Returns boolean

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

IInvSlotElement

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.

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

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

    • canvas: Canvas
    • scale: number

    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

IScaleElement

IScaleElement:

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.

readonlyDIRECTION_DOWN

DIRECTION_DOWN: number

readonlyDIRECTION_LEFT

DIRECTION_LEFT: number

readonlyDIRECTION_RIGHT

DIRECTION_RIGHT: number

readonlyDIRECTION_UP

DIRECTION_UP: number

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

IScriptableWatcher

IScriptableWatcher:

object

object: object

invalidate

  • invalidate(): void
  • Returns void

isDirty

  • isDirty(): boolean
  • Returns boolean

refresh

  • refresh(): void
  • Returns void

setTarget

  • setTarget(obj: object): void
  • Parameters

    • obj: object

    Returns void

validate

  • validate(): void
  • Returns void

IScrollElement

IScrollElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

ISlotElement

ISlotElement:

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.

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

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

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

    • canvas: Canvas
    • scale: number

    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

ISwitchElement

ISwitchElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • Returns boolean

onBindingUpdated

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

    • T = boolean

    Parameters

    • name: string
    • val: T

    Returns void

onDraw

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

    • canvas: Canvas
    • scale: number

    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

ITabElement

ITabElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

ITextElement

ITextElement:

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.

cleaner

description

description: object

descriptionWatcher

descriptionWatcher: IScriptableWatcher

elementName

elementName: string

elementRect

elementRect: Rect

isDirty

isDirty: boolean

isTouched

isTouched: boolean

window

window: Window

x

x: number

y

y: number

z

z: number

createTexture

debug

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

    • canvas: Canvas
    • scale: number

    Returns void

getBinding

  • getBinding<T>(name: string): IElement | Rect | T
  • 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

invalidate

  • invalidate(): void
  • Returns void

isReleased

  • isReleased(): boolean
  • 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

    • canvas: Canvas
    • scale: number

    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

ITouchEvent

ITouchEvent:

_x

_x: number

_y

_y: number

downX

downX: number

downY

downY: number

localX

localX: number

localY

localY: number

type

x

x: number

y

y: number

hasMovedSinceLastDown

  • hasMovedSinceLastDown(): boolean
  • Returns boolean

localPosAsScriptable

  • localPosAsScriptable(): { x: number; y: number }
  • Returns { x: number; y: number }

    • x: number
    • y: number

posAsScriptable

  • posAsScriptable(): { x: number; y: number }
  • Returns { x: number; y: number }

    • x: number
    • y: number

preparePosition

  • preparePosition(win: Window, rect: Rect): void
  • Parameters

    Returns void

update

  • update(event: MotionEvent): void
  • Parameters

    • event: MotionEvent

    Returns void

IWindow

IWindow:

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getContainer

getContent


  • Returns WindowContent

    Window's content object (usually specified in the window's constructor).

getElements

  • getElements(): HashMap<string, IElement>
  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    HashMap containing string element name as keys and element instances as values.

getStyle


  • Returns Style

    Object containing current style of the window.

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean

  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean

  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean

  • Returns boolean

    true if the window is opened, false otherwise.

onBackPressed

  • onBackPressed(): boolean

  • Returns boolean

    Whether the window can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setDebugEnabled

  • setDebugEnabled(debug: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • debug: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void

IWindowLocation

IWindowLocation:

optionalheight

height?: number

Height of the window in units, by default calculated to match bottom screen bound.

optionalscrollX

scrollX?: number

Defines scrollable window size along the X axis.

optionalscrollY

scrollY?: number

Defines scrollable window size along the Y axis.

optionalwidth

width?: number

Width of the window in units, by default calculated to match right screen bound.

optionalx

x?: number = 0

X coordinate of the window in units.

optionaly

y?: number = 0

Y coordinate of the window in units.

ImageDrawing

ImageDrawing:

optionalbitmap

bitmap?: string

optionalheight

height?: number

optionalscale

scale?: number

type

type: bitmap

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

LineDrawing

LineDrawing:

optionalcolor

color?: number

type

type: line

optionalwidth

width?: number

optionalx1

x1?: number

optionalx2

x2?: number

optionaly1

y1?: number

optionaly2

y2?: number

OnOpenCloseListener

StandardWindowBackgroundDescription

StandardWindowBackgroundDescription:

optionalbitmap

bitmap?: string

Background bitmap texture name. If the bitmap size doesn't match the screen size, bitmap will be stretched to fit.

optionalcolor

color?: number = 0xfff // white

Background color integer value, produced by android.graphics.Color class.

optionalframe

frame?: { bitmap?: string; scale?: number }

Specifies window's frame parameters.


Type declaration

  • optionalbitmap?: string

    Frame bitmap gui texture name. Defaults to "frame" style binding or, if not specified, to "default_frame_8" gui texture

  • optionalscale?: number

    Frame bitmap scale.

optionalstandard

standard?: boolean

If true, default window is created.

optionalstandart

standart?: boolean

If true, default window is created.

@deprecated

Use standard instead.

StandardWindowContent

StandardWindowContent:

Extended WindowContent object with additional params for UI.StandartWindow and UI.StandardWindow.

optionaldrawing

drawing?: DrawingSet

Array of drawings

optionalelements

elements?: ElementSet

Object containing keys as gui elements names and UI.Elements instances as values. Gui elements are interactive components that are used to create interfaces functionality.

optionallocation

Specifies window's location, used for UI.Window, UI.TabbedWindow and UI.StandartWindow.

optionalparams

params?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

@deprecated

Use style instead.

optionalstandard

Used for UI.StandartWindows and UI.StandardWindows. Specifies additional parameters for standard windows.

optionalstandart

Used for UI.StandartWindows and UI.StandardWindows. Specifies additional parameters for standard windows.

@deprecated

Use standard instead.

optionalstyle

style?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

StandardWindowDescription

StandardWindowDescription:

optionalbackground

Specifies background properties.

optionalheader

Specifies additional parameters for standard window's header.

optionalinventory

Specifies parameters for standard inventory window.

optionalminHeight

minHeight?: number

Specifies minimum contents window height. If actual height is less then desired, scrolling is used.

StandardWindowHeaderDescription

StandardWindowHeaderDescription:

optionalcolor

color?: number

Header background color integer value, produced by android.graphics.Color class. Default is Color.rgb(0x72, 0x6a, 0x70).

optionalframe

frame?: string

Frame bitmap gui texture name. Defaults to "headerFrame" style binding or, if not specified, to "default_frame_7" gui texture.

optionalheight

height?: number = 80

Specifies header height in units.

optionalhideButton

hideButton?: boolean = false

If true, close button is not displayed.

optionalhideShadow

hideShadow?: boolean = false

Specifies whether the header should have shadow or not. If true, the shadow is not displayed.

optionaltext

Specifies header text styles and value.

optionalwidth

width?: number

If height is not specified, used to specify header height in units.

StandardWindowHeaderTextDescription

StandardWindowHeaderTextDescription:

optionalcolor

color?: number

If font is not specified, used as color value.

optionalfont

optionalshadow

shadow?: number

If font is not specified, used as shadow value.

optionalsize

size?: number

If font is not specified, used as size value.

optionaltext

text?: string = “No Title”

Specifies header text.

StandardWindowInventoryDescription

StandardWindowInventoryDescription:

optionalpadding

padding?: number

Specifies additional padding for the inventory in units. Defaults to 20 units.

optionalstandard

standard?: boolean

If true, default window is created.

optionalwidth

width?: number

Inventory width in units. Defaults to 300 units.

TabbedWindowContent

TabbedWindowContent:

Specifies contents and additional parameters for all types of windows.

optionaldrawing

drawing?: DrawingSet

Array of drawings

optionalelements

elements?: ElementSet

Object containing keys as gui elements names and UI.Elements instances as values. Gui elements are interactive components that are used to create interfaces functionality.

optionalisButtonHidden

isButtonHidden?: boolean

optionallocation

Specifies window's location, used for UI.Window, UI.TabbedWindow and UI.StandartWindow.

optionalparams

params?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

@deprecated

Use style instead.

optionalstyle

style?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

TextDrawing

TextDrawing:

optionalfont

optionaltext

text?: string

type

type: text

optionalx

x?: number

optionaly

y?: number

UIButtonElement

UIButtonElement:

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

optionalbitmap

bitmap?: BitmapTypes

optionalbitmap2

bitmap2?: BitmapTypes

optionalclicker

clicker?: UIClickEvent

optionalscale

scale?: number

type

type: button | closeButton | close_button

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIClickEvent

UIClickEvent:

Object where you can specify how the UI element will behave on touch events.

optionalonClick

onClick?: (position: Vector, container: ItemContainer | UiAbstractContainer, tileEntity: any, window: IWindow, canvas: Canvas, scale: number) => void

This function will be called when element is short touched.


Type declaration

optionalonLongClick

onLongClick?: (position: Vector, container: ItemContainer | UiAbstractContainer, tileEntity: any, window: IWindow, canvas: Canvas, scale: number) => void

This function will be called when element is long touched.


Type declaration

UICustomElement

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

optionalclicker

clicker?: UIClickEvent

optionalcustom

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 declaration

type

type: custom

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIElement

UIElement:

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

optionalclicker

clicker?: UIClickEvent

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIFPSTextElement

UIFPSTextElement:

optionalinterpolate

interpolate?: boolean

optionalperiod

period?: number

type

type: fps

UIFrameElement

UIFrameElement:

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

optionalbitmap

bitmap?: BitmapTypes

optionalclicker

clicker?: UIClickEvent

optionalcolor

color?: number

optionalheight

height?: number

optionalscale

scale?: number

optionalsides

type

type: frame

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIImageElement

UIImageElement:

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

optionalbitmap

bitmap?: BitmapTypes

optionalclicker

clicker?: UIClickEvent

optionalheight

height?: number

optionaloverlay

overlay?: BitmapTypes

optionalscale

scale?: number

type

type: image

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIInvSlotElement

UIInvSlotElement:

optionalindex

index?: number

type

type: invSlot | invslot

UIScaleElement

UIScaleElement:

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

optionalbackground

background?: string

optionalbackgroundOffset

backgroundOffset?: { x?: number; y?: number }

Type declaration

  • optionalx?: number
  • optionaly?: number

optionalbitmap

bitmap?: string

optionalclicker

clicker?: UIClickEvent

optionaldirection

direction?: number

optionalheight

height?: number

optionalinvert

invert?: boolean

optionaloverlay

overlay?: string

optionaloverlayOffset

overlayOffset?: { x?: number; y?: number }

Type declaration

  • optionalx?: number
  • optionaly?: number

optionalpixelate

pixelate?: boolean

optionalscale

scale?: number

type

type: scale

optionalvalue

value?: number

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UIScrollElement

UIScrollElement:

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

optionalbindingObject

bindingObject?: any

optionalbindingProperty

bindingProperty?: string

optionalbitmapBg

bitmapBg?: string

optionalbitmapBgHover

bitmapBgHover?: string

optionalbitmapHandle

bitmapHandle?: BitmapTypes

optionalbitmapHandleHover

bitmapHandleHover?: BitmapTypes

optionalclicker

clicker?: UIClickEvent

optionalconfigValue

configValue?: ConfigValue

optionaldivider

divider?: number

optionalisInt

isInt?: boolean

optionallength

length?: number

optionalmax

max?: number

optionalmin

min?: number

optionalonNewValue

onNewValue?: (result: number, container: UiAbstractContainer, element: UIScrollElement) => void

Type declaration

optionalratio

ratio?: number

type

type: scroll

optionalwidth

width?: number

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UISlotElement

UISlotElement:

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

optionalbitmap

bitmap?: string

optionalclicker

clicker?: UIClickEvent

optionaldarken

darken?: boolean

optionaldisablePixelPerfect

disablePixelPerfect?: boolean = false
@since

2.2.1b96

optionaliconScale

iconScale?: number = 0.82
@since

2.2.1b96

optionalisDarkenAtZero

isDarkenAtZero?: boolean

optionalisTransparentBackground

isTransparentBackground?: boolean
@deprecated

In 2.0.4b43, not needed anymore.

optionalisValid

isValid?: (id: number, count: number, data: number, container: Container, item: ItemInstance) => boolean

Type declaration

optionalmaxStackSize

maxStackSize?: number

optionalneedClean

needClean?: boolean
@deprecated

In 2.0.4b43, not needed anymore.

optionalonItemChanged

onItemChanged?: (container: UiAbstractContainer, oldId: number, oldCount: number, oldData: number) => void

Type declaration

optionalsize

size?: number

optionalsource

source?: ItemInstance

optionaltext

text?: string
@since

2.0.4b42

type

type: slot

optionalvisual

visual?: boolean

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UISwitchElement

UISwitchElement:

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

optionalbindingObject

bindingObject?: any

optionalbindingProperty

bindingProperty?: string

optionalbitmapOff

bitmapOff?: BitmapTypes

optionalbitmapOffHover

bitmapOffHover?: BitmapTypes

optionalbitmapOn

bitmapOn?: BitmapTypes

optionalbitmapOnHover

bitmapOnHover?: BitmapTypes

optionalclicker

clicker?: UIClickEvent

optionalconfigValue

configValue?: ConfigValue

optionalonNewState

onNewState?: (val: boolean, container: UiAbstractContainer, element: UISwitchElement) => void

Type declaration

optionalscale

scale?: number

type

type: switch

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UITabElement

UITabElement:

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

optionalclicker

clicker?: UIClickEvent

optionaldeselectedColor

deselectedColor?: number

optionalisAlwaysSelected

isAlwaysSelected?: boolean

optionalisSelected

isSelected?: boolean

optionalselectedColor

selectedColor?: number

optionaltabIndex

tabIndex?: number

type

type: tab

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UITextElement

UITextElement:

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

optionalclicker

clicker?: UIClickEvent

optionalfont

optionalformat

format?: boolean

optionalformatMaxCharsPerLine

formatMaxCharsPerLine?: number

optionalmultiline

multiline?: boolean

optionaltext

text?: string

type

type: text

optionalx

x?: number

optionaly

y?: number

optionalz

z?: number

UiAbstractContainer

UiAbstractContainer:

addElementInstance

  • addElementInstance(element: IElement, name: string): void
  • Parameters

    Returns void

close

  • close(): void
  • Returns void

getBinding

  • getBinding<T>(element: string, bindingName: string): IElement | T | Rect
  • Type parameters

    • T = any

    Parameters

    • element: string
    • bindingName: string

    Returns IElement | T | Rect

getElement

  • getElement(elementName: string): IElement
  • Parameters

    • elementName: string

    Returns IElement

getParent

  • getParent(): any
  • Returns any

getSlotVisualImpl

handleBindingDirty

  • handleBindingDirty(element: string, bindingName: string): void
  • Parameters

    • element: string
    • bindingName: string

    Returns void

handleInventoryToSlotTransaction

  • handleInventoryToSlotTransaction(inventorySlot: number, slot: string, amount: number): void
  • Parameters

    • inventorySlot: number
    • slot: string
    • amount: number

    Returns void

handleSlotToInventoryTransaction

  • handleSlotToInventoryTransaction(slot: string, amount: number): void
  • Parameters

    • slot: string
    • amount: number

    Returns void

handleSlotToSlotTransaction

  • handleSlotToSlotTransaction(slot1: string, slot2: string, amount: number): void
  • Parameters

    • slot1: string
    • slot2: string
    • amount: number

    Returns void

onWindowClosed

  • onWindowClosed(): void
  • Returns void

openAs

  • Parameters

    Returns void

setBinding

  • setBinding<T>(element: string, bindingName: string, obj: T): void
  • Type parameters

    • T

    Parameters

    • element: string
    • bindingName: string
    • obj: T

    Returns void

UiVisualSlotImpl

UiVisualSlotImpl:

getCount

  • getCount(): number
  • Returns number

getData

  • getData(): number
  • Returns number

getExtra

getId

  • getId(): number
  • Returns number

WindowContent

WindowContent:

Specifies contents and additional parameters for all types of windows.

optionaldrawing

drawing?: DrawingSet

Array of drawings

optionalelements

elements?: ElementSet

Object containing keys as gui elements names and UI.Elements instances as values. Gui elements are interactive components that are used to create interfaces functionality.

optionallocation

Specifies window's location, used for UI.Window, UI.TabbedWindow and UI.StandartWindow.

optionalparams

params?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

@deprecated

Use style instead.

optionalstyle

style?: BindingSet

Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.

WindowEventListener

WindowEventListener:

Object used to handle windows opening and closing events.

optionalonClose

onClose?: (window: Window) => void

Called when the window is closed.


Type declaration

optionalonOpen

onOpen?: (window: Window) => void

Called when the window is opened.


Type declaration

WindowLocationDescription

WindowLocationDescription:

Object representing window location used in window content object and UI.WindowLocation constructor.

optionalforceScrollX

forceScrollX?: boolean

optionalforceScrollY

forceScrollY?: boolean

optionalglobalScale

globalScale?: boolean

Determines whether the interface needs to be resized based on its size or a global unit system should be used.

@since

2.3.1b115

optionalheight

height?: number

Height of the window in units, by default calculated to match bottom screen bound.

optionalpadding

padding?: { bottom?: number; left?: number; right?: number; top?: number }

Paddings are distances from the window bounds to the elements in the window.


Type declaration

  • optionalbottom?: number
  • optionalleft?: number
  • optionalright?: number
  • optionaltop?: number

optionalscrollX

scrollX?: number

Defines scrollable window size along the X axis.

optionalscrollY

scrollY?: number

Defines scrollable window size along the Y axis.

optionalwidth

width?: number

Width of the window in units, by default calculated to match right screen bound.

optionalx

x?: number = 0

X coordinate of the window in units.

optionaly

y?: number = 0

Y coordinate of the window in units.

Type Aliases

BindingSet

BindingSet: {}

Object containing binding names as keys and string values as gui textures names.


Type declaration

  • [key string]: string

BitmapTypes

BitmapTypes: string | string[] | android.graphics.Bitmap | android.graphics.Bitmap[]

Types that can be used to create element texture. For static textures it can be string path to texture in assets directory, or android.graphics.Bitmap instance. For animated textures it can be array of string paths to texture in assets directory, or an array of android.graphics.Bitmap instances. Each element in the array represents one of animation frames.

DrawingElements

DrawingSet

DrawingSet: DrawingElements[]

Element

Element: UIElement

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

Elements

Object containing ui elements with key as the name and value as the UI.UIElement instance to be used.

FontParams

FontParams: FontDescription

Object containing font parameters. If no color, size and shadow are specified, default values are ignored and white font with text size 20, white color and 0.45 shadow is created.

OnOpenCloseListenerJS

OnOpenCloseListenerJS: OnOpenCloseListener

TouchEventType

TouchEventType: DOWN | UP | MOVE | CLICK | LONG_CLICK | CANCEL

UICloseButtonElement

UICloseButtonElement: UIButtonElement

WindowLocationParams

WindowLocationParams: WindowLocationDescription

Object representing window location used in window content object and UI.WindowLocation constructor.

Functions

getContext

  • getContext(): android.app.Activity
  • Returns the currently running Android Activity, which can be used for various actions: opening dialogs, instantiating widgets, and many other operations with android.content.Context.

    @remarks

    It is not recommended to use it if it is possible to find a replacement in the presented Inner Core API.


    Returns android.app.Activity

getMinecraftUiScale

  • getMinecraftUiScale(): number
  • Determines the overall size of game interface, which can vary depending on specific settings that are in place.

    @since

    2.3.1b115


    Returns number

getRelMinecraftUiScale

  • getRelMinecraftUiScale(): number
  • Defines the size of interface relative to the UI.getMinecraftUiScale, with dimensions specified in units used within Inner Core interfaces.

    @since

    2.3.1b115


    Returns number

getScreenHeight

  • getScreenHeight(): number

  • Returns number

    Screen height in units.

getScreenRelativeHeight

  • getScreenRelativeHeight(): number
Page Options