Skip to main content

UI

Index

Classes

Interfaces

Type Aliases

Functions

Type Aliases

BindingSet

BindingSet: {}

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


Type declaration

  • [key string]: string

BindingsSet

BindingsSet: BindingSet
That feature is obsolete

Alias of BindingSet, please use it instead.

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.

FontColor
since: 3.1.0b126

FontColor: string | [r: number, g: number, b: number, a?: number] | number

Hex color like #ffffffor color names like a red, pink and another or [r, g, b, a?] array.

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

UIButtonElement

UIButtonElement: UIButtonElementProps & { type: button | closeButton | close_button }

UICloseButtonElement

UICloseButtonElement: UIButtonElement

UICustomElement

UICustomElement: UICustomElementProps & { type: custom }

UIFPSTextElement

UIFPSTextElement: UIFPSTextElementProps & { type: fps }

UIFrameElement

UIFrameElement: UIFrameElementProps & { type: frame }

UIImageElement

UIImageElement: UIImageElementProps & { type: image }

UIInvSlotElement

UIInvSlotElement: UIInvSlotElementProps & { type: invSlot | invslot }

UIScaleElement

UIScaleElement: UIScaleElementProps & { type: scale }

UIScrollElement

UIScrollElement: UIScrollElementProps & { type: scroll }

UISlotElement

UISlotElement: UISlotElementProps & { type: slot }

UISwitchElement

UISwitchElement: UISwitchElementProps & { type: switch }

UITabElement

UITabElement: UITabElementProps & { type: tab }

UITextElement

UITextElement: UITextElementProps & { type: text }

WindowLocationParams

WindowLocationParams: WindowLocationDescription

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

Functions

getContext

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

    More about capabilities

    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
  • since: 2.3.1b115

    Determines the overall size of game interface, which can vary depending on specific settings that are in place.


    Returns number

getRelMinecraftUiScale

  • getRelMinecraftUiScale(): number
  • since: 2.3.1b115

    Defines the size of interface relative to the UI.getMinecraftUiScale, with dimensions specified in units used within Inner Core interfaces.


    Returns number

getScreenHeight

  • getScreenHeight(): number
  • Returns number

    Screen height in units.

getScreenRelativeHeight

  • getScreenRelativeHeight(): number

parseColor

  • since: 3.1.0b126

    Method to unwrap complex color variants into number.


    Parameters

    • value: FontColor

      hex-string, rgba array or names of color in a string format.

    • optionaldefaultValue: FontColor

      returns if result is wrong, even if it fails, transparent (0) is returned

    Returns number

playSound

  • playSound(sound: string, volume?: number, pitch?: number): void
  • since: 3.1.1b127

    Plays client sound designed for interfaces, can be stopped as ordinal client sound, will be played even in menu.


    Parameters

    • sound: string

      resource pack sound name

    • optionalvolume: number

      default 1.0

    • optionalpitch: number

      default 1.0

    Returns void