UI
Index
Classes
Interfaces
- AbstractSlot
- ColorDrawing
- CustomDrawing
- DrawColor
- DrawCustom
- DrawFrame
- DrawImage
- DrawLine
- DrawText
- ElementSet
- FontDescription
- FrameDrawing
- FrameTexture
- FrameTextureSides
- IBackgroundProvider
- IBitmapWrap
- IButtonElement
- ICloseButtonElement
- IContentProvider
- ICustomElement
- IDrawing
- IElement
- IElementCleaner
- IElementProvider
- IFPSTextElement
- IFrameElement
- IImageElement
- IInvSlotElement
- IScaleElement
- IScriptableWatcher
- IScrollElement
- ISlotElement
- ISwitchElement
- ITabElement
- ITextElement
- ITouchEvent
- IWindow
- IWindowLocation
- ImageDrawing
- LineDrawing
- OnOpenCloseListener
- StandardWindowBackgroundDescription
- StandardWindowContent
- StandardWindowDescription
- StandardWindowHeaderDescription
- StandardWindowHeaderTextDescription
- StandardWindowInventoryDescription
- TabbedWindowContent
- TextDrawing
- UIButtonElement
- UIClickEvent
- UICustomElement
- UIElement
- UIFPSTextElement
- UIFrameElement
- UIImageElement
- UIInvSlotElement
- UIScaleElement
- UIScrollElement
- UISlotElement
- UISwitchElement
- UITabElement
- UITextElement
- UiAbstractContainer
- UiVisualSlotImpl
- WindowContent
- WindowEventListener
- WindowLocationDescription
Type Aliases
Functions
Classes
AdaptiveWindow
constructor
Constructs new UI.AdaptiveWindow with specified content.
Parameters
content: WindowContent
object containing window description
Returns AdaptiveWindow
closeOnBackPressed
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
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
Closes window without container. Use only if the window was opened without container.
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getAllWindows
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
null
for WindowGroup.
getElements
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
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
Returns Collection<string>
Collection object containing string names of the windows in the group.
invalidateAllContent
Returns void
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
moveOnTop
Moves window with specified name to the top of the group.
Parameters
name: string
window name
Returns void
onBackPressed
Returns boolean
Whether the window group can be closed on pressing back navigation button.
open
Opens window without container.
Returns void
refreshAll
Forces refresh for all windows.
Returns void
refreshWindow
Forces window refresh by it's name.
Parameters
name: string
name of the window to refresh
Returns void
removeWindow
Removes window from group by it's name.
Parameters
name: string
window name
Returns void
setBlockingBackground
Parameters
bb: boolean
Returns void
setCloseOnBackPressed
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
container: UiAbstractContainer
UI.Container to be associated with current window or
null
to associate no container with current window.
Returns void
setContent
Parameters
content: WindowContent
Returns void
setDebugEnabled
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
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
Sets style profile for the current UI.AdaptiveWindow.
Parameters
profile: 0 | 1
0 for classic profile, 1 for default profile
Returns void
setStyle
Parameters
style: Style
Returns void
setWindowContent
Sets content for the window by it's name.
Parameters
name: string
window name
content: WindowContent
content object
Returns void
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
Removes all elements with current element name prefix. In other words, removes all elements that were created by this. UI.ConfigVisualizer instance
Parameters
elements: ElementSet
target UI.WindowContent.elements section
Returns void
createVisualContent
Creates elements in the window to visualize configuration file.
Parameters
elements: ElementSet
target UI.WindowContent.elements section
optionalprefs: Partial<Vector>
top left position of the first element. Default position is (0, 0, 0)
Returns void
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.
constructor
Creates a new instance of UI.Container.
Returns Container
parent
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
Type declaration
[slotName string]: Slot
tileEntity
Same as UI.Container.parent.
staticreadonlyisContainer
_addElement
Parameters
element: IElement
name: string
Returns void
_removeElement
Parameters
name: string
Returns void
addElementInstance
Parameters
element: IElement
name: string
Returns void
applyChanges
Returns void
asScriptableField
Returns Slot[]
JS array of all slots.
clearSlot
Clears slot's contents.
Parameters
name: string
slot name
Returns void
close
Closes currently opened window.
Returns void
dropAt
Drops the contents of all the slots in the container on the specified coordinates and clears them.
Parameters
x: number
y: number
z: number
Returns void
dropSlot
Drops slot's contents on the specified coordinates and clears the slot.
Parameters
name: string
slot name
x: number
y: number
z: number
Returns void
getBinding
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
Parameters
slot: number
slot index
Returns Slot
Workbench slot instance by slot index.
getFullSlot
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
Same as getWindow.
Returns IWindow
getParent
Getter for UI.Container.parent field.
Returns any
getSlot
getSlotVisualImpl
Parameters
name: string
Returns UiVisualSlotImpl
getText
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
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
Returns number
9
*
handleBindingDirty
Returns void
handleInventoryToSlotTransaction
Parameters
invSlot: number
slotName: string
amount: number
Returns void
handleSlotToInventoryTransaction
Parameters
slotName: string
amount: number
Returns void
handleSlotToSlotTransaction
Parameters
from: string
to: string
amount: number
Returns void
invalidateUI
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 passtrue
as the parameter
Returns void
invalidateUIDrawing
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 passtrue
as the parameter
Returns void
invalidateUIElements
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 passtrue
as the parameter
Returns void
isElementTouched
Parameters
name: string
element name
Returns boolean
true
if the element is currently hovered.
isLegacyContainer
Returns boolean
false
if container supports multiplayer,true
otherwise.
isOpened
Returns boolean
true
, if some window is opened in the container.
onWindowClosed
Returns void
openAs
Opens UI.IWindow object in the container.
Parameters
win: IWindow
UI.IWindow object to be opened
Returns void
refreshSlots
Returns void
sendChanges
Returns void
setBinding
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
listener: OnOpenCloseListener
object to be notified when the window is closed
Returns void
setOnOpenListener
Sets an object to be notified when the window is opened.
Parameters
listener: OnOpenCloseListener
object to be notified when the window is opened
Returns void
setParent
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
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
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
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
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
Validates all the slots in the container.
Returns void
validateSlot
Validates slot contents. If the data value is less then
0
, it becomes0
, if ID is0
or count is less then or equals to zero, slot is reset to an empty one.Parameters
name: string
slot name
Returns void
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
color
isBold
isCursive
isUnderlined
shadow
size
staticreadonlyALIGN_CENTER
Aligns text to the start of the element (left for English locale).
staticreadonlyALIGN_CENTER_HORIZONTAL
Aligns text to the center of the element horizontally.
staticreadonlyALIGN_DEFAULT
Aligns text to the center of the element.
staticreadonlyALIGN_END
Aligns text to the end of the element (right for English locale).
asScriptable
Converts current Font object to scriptable font description.
Returns FontDescription
drawText
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
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
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
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
Namespace containing method to get FrameTexture instances.
constructor
Returns FrameTextureSource
staticget
Parameters
name: string
gui texture name of the frame
Returns FrameTexture
Slot
constructor
Parameters
id: number
count: number
data: number
Returns Slot
count
data
extra
id
drop
Parameters
x: number
y: number
z: number
Returns void
getClassName
Returns slot
getCount
Returns number
getData
Returns number
getExtra
Returns ItemExtraData
getExtraValue
Returns number
getId
Returns number
getInt
Parameters
name: string
Returns number
getTarget
Returns ItemInstance
put
Parameters
name: string
prop: any
Returns void
save
Returns Slot
set
Parameters
id: number
count: number
data: number
Returns void
validate
Returns void
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.
constructor
Constructs new UI.StandardWindow with specified content. Content is applied to the main window, header and inventory remain the same.
Parameters
content: StandardWindowContent
object containing window description
Returns StandardWindow
closeOnBackPressed
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
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
Closes window without container. Use only if the window was opened without container.
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getAllWindows
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 StandardWindowContent
null
for WindowGroup.
getElements
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
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
Returns Collection<string>
Collection object containing string names of the windows in the group.
invalidateAllContent
Returns void
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
moveOnTop
Moves window with specified name to the top of the group.
Parameters
name: string
window name
Returns void
onBackPressed
Returns boolean
Whether the window group can be closed on pressing back navigation button.
open
Opens window without container.
Returns void
refreshAll
Forces refresh for all windows.
Returns void
refreshWindow
Forces window refresh by it's name.
Parameters
name: string
name of the window to refresh
Returns void
removeWindow
Removes window from group by it's name.
Parameters
name: string
window name
Returns void
setBlockingBackground
Parameters
bb: boolean
Returns void
setCloseOnBackPressed
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
container: UiAbstractContainer
UI.Container to be associated with current window or
null
to associate no container with current window.
Returns void
setContent
Parameters
content: StandardWindowContent
Returns void
setDebugEnabled
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
style: Style
Returns void
setWindowContent
Sets content for the window by it's name.
Parameters
name: string
window name
content: WindowContent
content object
Returns void
StandartWindow
Legacy misspelled standard UI, which is works under classic styling and must be used only in unsupported mods.
constructor
Constructs new UI.StandartWindow with specified content. Content is applied to the main window, header and inventory remain the same.
Parameters
content: StandardWindowContent
object containing window description
Returns StandartWindow
closeOnBackPressed
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
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
Closes window without container. Use only if the window was opened without container.
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getAllWindows
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 StandardWindowContent
null
for WindowGroup.
getElements
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
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
Returns Collection<string>
Collection object containing string names of the windows in the group.
invalidateAllContent
Returns void
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
moveOnTop
Moves window with specified name to the top of the group.
Parameters
name: string
window name
Returns void
onBackPressed
Returns boolean
Whether the window group can be closed on pressing back navigation button.
open
Opens window without container.
Returns void
refreshAll
Forces refresh for all windows.
Returns void
refreshWindow
Forces window refresh by it's name.
Parameters
name: string
name of the window to refresh
Returns void
removeWindow
Removes window from group by it's name.
Parameters
name: string
window name
Returns void
setBlockingBackground
Parameters
bb: boolean
Returns void
setCloseOnBackPressed
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
container: UiAbstractContainer
UI.Container to be associated with current window or
null
to associate no container with current window.
Returns void
setContent
Parameters
content: StandardWindowContent
Returns void
setDebugEnabled
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
style: Style
Returns void
setWindowContent
Sets content for the window by it's name.
Parameters
name: string
window name
content: WindowContent
content object
Returns void
Style
Object representing window style. Window styles allows to customize the way your windows look like.
constructor
Constructs new UI.Style object with bindings from UI.Style.DEFAULT.
Returns Style
staticreadonlyCLASSIC
Classic (0.16.*-like) windows style, which also used before legacy version.
staticreadonlyDEFAULT
Default windows style.
staticreadonlyLEGACY
addAllBindings
Adds all values from given UI.BindingSet object.
Parameters
bindings: BindingSet
Returns void
addBinding
Adds gui texture name to use for the specified window part.
Parameters
key: string
binding name
name: string
gui texture name
Returns void
addStyle
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
Returns Collection<string>
Collection containing all binding names from the current style object.
getBinding
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
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
Parameters
name: string
fallback: boolean
Returns boolean
getDoubleProperty
Parameters
name: string
fallback: number
Returns number
getFloatProperty
Parameters
name: string
fallback: number
Returns number
getIntProperty
Parameters
name: string
fallback: number
Returns number
getStringProperty
Parameters
name: string
fallback: string
Returns string
inherit
Specifies parent style object for the current style.
Parameters
style: Style
style to be set as parent
Returns void
setProperty
Parameters
name: string
value: any
Returns void
staticgetBitmapByDescription
Parameters
style: Style
description: string
Returns IBitmapWrap
TabbedWindow
Class used to create windows with multiple tabs.
constructor
Constructs new UI.TabbedWindow with specified location.
Parameters
loc: WindowLocation
location to be used for the tabbed window
Returns TabbedWindow
closeOnBackPressed
currentTab
close
Closes window without container. Use only if the window was opened without container.
Returns void
frame
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
Returns number
Current default tab index. If no default tab was specified via UI.TabbedWindow.setDefaultTab, the first tab added becomes default.
getElements
Gets all the elements in the window.
Returns HashMap<string, IElement>
HashMap containing string element name as keys and element instances as values.
getGlobalTabSize
Returns number
Tab selector window width in global units.
getInnerWindowHeight
Returns number
Tab content window height in units.
getInnerWindowWidth
Returns number
Tab content window width in units.
getStyle
Returns Style
Object containing current style of the window.
getStyleSafe
Returns Style
getWindowForTab
getWindowTabSize
Returns number
Tab selector window width in units.
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
onBackPressed
Returns boolean
Whether the window can be closed on pressing back navigation button.
onTabSelected
Parameters
index: number
Returns void
open
Opens window without container.
Returns void
setBlockingBackground
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
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
container: UiAbstractContainer
UI.Container to be associated with current window or null to associate no container with current window
Returns void
setDebugEnabled
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
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
listener: WindowEventListener
Returns void
setFakeTab
Creates fake tab with no content.
Parameters
index: number
index of the tab, see UI.TabbedWindow.setTab for details
tabOverlay: ElementSet
content of the tab selector
Returns void
setLocation
Sets window location (bounds) to draw window within.
Parameters
location: WindowLocation
location to be used for the tabbed window
Returns void
setStyle
setTab
Sets content of the tab.
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 isfalse
Returns void
setTabEventListener
Sets listener to be notified about tab with specified index opening/closing events.
Parameters
index: number
tab index
listener: WindowEventListener
object to be notified about the events
Returns void
Texture
Class representing static or animated texture.
constructor
animation
bitmap
delay
isAnimation
draw
Parameters
canvas: Canvas
x: number
y: number
scale: number
Returns void
drawCutout
Parameters
canvas: Canvas
cutout: RectF
x: number
y: number
scale: number
Returns void
fitAllToOneSize
Resizes all the frames to match the first one.
Returns void
getBitmap
Parameters
frame: number
frame number
Returns Bitmap
Bitmap object containing animation frame for the corresponding frame number.
getBitmapWrap
Parameters
frame: number
Returns IBitmapWrap
getFrame
Returns number
Frame number of the animation corresponding to current system time.
getHeight
Returns number
Height of the texture in pixels.
getWidth
Returns number
Width of the texture in pixels.
isAnimated
Returns boolean
readOffset
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
Releases all allocated resources, should be called when the texture is not longer needed.
Returns void
rescaleAll
Resizes all the frames by constant scale multiplier.
Parameters
scale: number
scale to modify the frames by
Returns void
resizeAll
Resizes all the frames of the texture to the specified size.
Parameters
width: number
height: number
Returns void
TextureSource
Namespace containing methods used to get and add gui textures.
constructor
Returns TextureSource
staticget
Parameters
name: string
gui texture name
Returns Bitmap
Bitmap instance with the ui texture, if it was loaded, with
"missing_texture"
texture otherwise.
staticgetNullable
Parameters
name: string
gui texture name
Returns Bitmap
Bitmap instance with the ui texture, if it was loaded,
null
otherwise.
staticput
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
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
content
elementProvider
elementView
isBackgroundDirty
isForegroundDirty
layout
location
addAdjacentWindow
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
Closes window without container. Use only if the window was opened without container.
Returns void
debug
Writes debug information about current window to the log.
Returns void
forceRefresh
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getBackgroundProvider
Type parameters
Returns 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
Returns IContentProvider
getElementProvider
Type parameters
Returns T
getElements
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.
Returns WindowEventListener
getLocation
Returns WindowLocation
Window's current location object.
getParentWindow
Returns IWindow
Current window's parent window.
getProperty
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
Returns number
Unit size (in pixel) in the window's bounds.
getStyle
Returns Style
Object containing current style of the window.
invalidateAllContent
Returns void
invalidateBackground
Returns void
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
invalidateForeground
Returns void
isBlockingBackground
Returns boolean
true
if window blocks background.
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isNotFocusable
Returns boolean
true
if the window is game overlay,false
otherwise.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
isTouchable
Returns boolean
true
if the window is touchable,false
otherwise.
onBackPressed
Returns boolean
Whether the window can be closed on pressing back navigation button.
open
Opens window without container.
Returns void
postBackgroundRefresh
Returns void
postElementRefresh
Returns void
postOpen
Returns void
preOpen
Returns void
putProperty
Sets custom property value.
Type parameters
- T
Parameters
name: string
custom property name
value: T
custom property value
Returns void
removeAdjacentWindow
Removes adjacent window from the adjacent windows list.
Parameters
window: Window
another window that was added as adjacent
Returns void
runCachePreparation
Parameters
async: boolean
Returns void
setAsGameOverlay
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
Set background color of window.
Parameters
color: number
integer color value (you can specify it using hex value)
Returns void
setBlockingBackground
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
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
container: UiAbstractContainer
UI.Container to be associated with current window or
null
to associate no container with current window.
Returns void
setContent
Specifies the content of the window.
Parameters
content: WindowContent
content object to be applied to the window
Returns void
setDebugEnabled
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
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
listener: WindowEventListener
Returns void
setInventoryNeeded
Parameters
inventoryNeeded: boolean
specify
true
if the window requires player's inventory
Returns void
setParentWindow
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
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
Returns void
updateWindowLocation
Returns void
updateWindowPositionAndSize
Returns void
WindowGroup
Class representing several windows opened at the same. For example, UI.StandardWindow is a window group that consists of several separate windows.
constructor
Constructs new UI.WindowGroup instance.
Returns WindowGroup
closeOnBackPressed
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
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
Closes window without container. Use only if the window was opened without container.
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getAllWindows
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
null
for WindowGroup.
getElements
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
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
Returns Collection<string>
Collection object containing string names of the windows in the group.
invalidateAllContent
Returns void
invalidateDrawing
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
moveOnTop
Moves window with specified name to the top of the group.
Parameters
name: string
window name
Returns void
onBackPressed
Returns boolean
Whether the window group can be closed on pressing back navigation button.
open
Opens window without container.
Returns void
refreshAll
Forces refresh for all windows.
Returns void
refreshWindow
Forces window refresh by it's name.
Parameters
name: string
name of the window to refresh
Returns void
removeWindow
Removes window from group by it's name.
Parameters
name: string
window name
Returns void
setBlockingBackground
Parameters
bb: boolean
Returns void
setCloseOnBackPressed
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
container: UiAbstractContainer
UI.Container to be associated with current window or
null
to associate no container with current window.
Returns void
setDebugEnabled
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
style: Style
Returns void
setWindowContent
Sets content for the window by it's name.
Parameters
name: string
window name
content: WindowContent
content object
Returns void
WindowLocation
Class representing window's location. All coordinates are defined in units (given screen's width is 1000 units).
constructor
Constructs new UI.WindowLocation instance with default position and size (fullscreen window).
Returns WindowLocation
forceScrollX
forceScrollY
globalScale
Determines whether the interface needs to be resized based on its size or a global unit system should be used.
height
Window height.
scale
Window scale.
scrollX
Horizontal window scroll.
scrollY
Vertical window scroll.
width
Window width.
x
Window horizontal position.
y
Window vertical position.
zIndex
Window position on layers.
staticreadonlyPADDING_BOTTOM
Constant used to represent bottom padding.
staticreadonlyPADDING_LEFT
Constant used to represent left padding.
staticreadonlyPADDING_RIGHT
Constant used to represent right padding.
staticreadonlyPADDING_TOP
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
Creates a copy of current UI.WindowLocation object.
Returns WindowLocation
Newly created copy of the object.
getDrawingScale
Returns number
Unit size (in pixels) in the window's bounds.
getLayoutParams
Parameters
a1: number
a2: number
a3: number
Returns LayoutParams
getRect
Returns Rect
Window's rectangle in the android.graphics.Rect object.
getScale
Returns number
Unit size (in pixels) in the fullscreen context (
<screen width> / 1000
).
getWindowHeight
Returns number
Window's height in units.
getWindowWidth
Returns 1000
Window's width in units (always 1000 by definition of the unit).
globalToWindow
Transforms dimension in fullscreen units to the dimension within window's bounds.
Parameters
val: number
value to be transformed
Returns number
removeScroll
Sets window's scroll size to the windows size to remove scroll.
Returns void
set
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
Sets padding of the window.
Parameters
padding: 0 | 1 | 2 | 3
value: number
value of the padding to be assigned to appropriate window bound
Returns void
setScroll
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
Sets the size of the window.
Parameters
x: number
window's width
y: number
window's height
Returns void
setZ
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
Parameters
win: PopupWindow
Returns void
showPopupWindow
Parameters
win: PopupWindow
Returns void
updatePopupWindow
Parameters
win: PopupWindow
Returns void
windowToGlobal
Transforms dimension within window's bounds to the dimension in fullscreen units.
Parameters
val: number
value to be transformed
Returns number
Interfaces
AbstractSlot
getCount
Returns number
getData
Returns number
getExtra
Returns ItemExtraData
getId
Returns number
set
Parameters
id: number
count: number
data: number
extra: ItemExtraData
Returns void
validate
Returns void
ColorDrawing
optionalcolor
optionalcolorMode
optionalmode
type
CustomDrawing
optionalonDraw
Type declaration
Parameters
canvas: Canvas
scale: number
Returns void
type
DrawColor
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: ColorDrawing
style: Style
Returns void
DrawCustom
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: CustomDrawing
style: Style
Returns void
DrawFrame
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: FrameDrawing
style: Style
Returns void
DrawImage
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: ImageDrawing
style: Style
Returns void
DrawLine
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: LineDrawing
style: Style
Returns void
DrawText
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: TextDrawing
style: Style
Returns void
ElementSet
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
Same as alignment.
optionalalignment
Font alignment, one of the UI.Font.ALIGN_DEFAULT, UI.Font.ALIGN_CENTER, UI.Font.ALIGN_END constants.
optionalbold
If true
, the font is bold, false
otherwise.
optionalcolor
Font color, android integer color value (produced by android.graphics.Color).
optionalcursive
If true
, the font is italic, false
otherwise.
optionalshadow
Font shadow offset.
optionalsize
Font size.
optionalunderline
If true
, the font is underlined, false
otherwise.
FrameDrawing
optionalbg
optionalbitmap
optionalcolor
optionalheight
optionalscale
optionalsides
type
optionalwidth
optionalx
optionaly
FrameTexture
Object used to manipulate frame textures.
readonlyCORNER_BOTTOM_LEFT
Specifies bottom left corner of the frame.
readonlyCORNER_BOTTOM_RIGHT
Specifies bottom right corner of the frame.
readonlyCORNER_TOP_LEFT
Specifies top left corner of the frame.
readonlyCORNER_TOP_RIGHT
Specifies top right corner of the frame.
readonlySIDE_BOTTOM
Specifies bottom side of the frame.
readonlySIDE_LEFT
Specifies left side of the frame.
readonlySIDE_RIGHT
Specifies right side of the frame.
readonlySIDE_TOP
Specifies top side of the frame.
draw
Parameters
canvas: Canvas
rect: RectF
scale: number
color: number
sides: [boolean, boolean, boolean, boolean]
Returns void
expand
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
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
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
Returns number
Object packed integer color value of the central pixel of the source texture.
getSideSource
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
Returns Bitmap
Original frame texture source stored in android.graphics.Bitmap instance.
FrameTextureSides
optionaldown
optionalleft
optionalright
optionalup
IBackgroundProvider
addDrawing
Parameters
idrawing: IDrawing
Returns void
clearAll
Returns void
prepareCache
Returns void
releaseCache
Returns void
setBackgroundColor
Parameters
color: number
Returns void
IBitmapWrap
readonlyMISSING_BITMAP
get
Returns Bitmap
getConfig
Returns Config
getHeight
Returns number
getResizedCache
Parameters
width: number
height: number
Returns Bitmap
getStackPos
Returns number
getWidth
Returns number
isRecycled
Returns boolean
recycle
Returns void
removeCache
Returns void
resize
Parameters
x: number
y: number
Returns IBitmapWrap
restore
Returns boolean
restoreIfNeeded
Returns void
store
Returns boolean
storeIfNeeded
Returns void
wrap
Parameters
bmp: Bitmap
Returns IBitmapWrap
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
value: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIButtonElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
value: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIButtonElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
IContentProvider
content
drawing
drawingWatcher
elementMap
elements
window
invalidateAllContent
Returns void
refreshDrawing
Returns void
refreshElements
Returns void
setContentObject
Parameters
content: WindowContent
Returns void
setupDrawing
Returns void
setupElements
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
getScope
Returns object
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UICustomElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
IDrawing
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onSetup
Parameters
scriptable: object
style: Style
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
str: string
obj: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T: UIElement
Parameters
optionaldescr: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
IElementCleaner
element
rect
clean
Parameters
canvas: Canvas
scale: number
Returns void
clone
Returns IElementCleaner
debug
Parameters
canvas: Canvas
scale: number
Returns void
set
Parameters
rect: Rect
Returns void
IElementProvider
addOrRefreshElement
Parameters
element: IElement
Returns void
getStyleFor
invalidateAll
Returns void
releaseAll
Returns void
removeElement
Parameters
element: IElement
Returns void
resetAll
Returns void
runCachePreparation
Returns void
setBackgroundProvider
Parameters
bgprovider: IBackgroundProvider
Returns void
setWindowStyle
Parameters
style: Style
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIFPSTextElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIFrameElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
height
isDirty
isTouched
overlay
texture
textureScale
width
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isAnimated
Returns boolean
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIImageElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
cleaner
curCount
curData
curExtra
curId
description
descriptionWatcher
elementName
elementRect
isDarken
isDarkenAtZero
isDirty
isTouched
isVisual
maxStackSize
size
slotName
source
textOverride
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
getMaxItemTransferAmount
Parameters
slot: ISlotElement
Returns number
getMaxStackSize
Returns number
invalidate
Returns void
isReleased
Returns boolean
isValidItem
Parameters
id: number
count: number
data: number
extra: ItemExtraData
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIInvSlotElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
readonlyDIRECTION_LEFT
readonlyDIRECTION_RIGHT
readonlyDIRECTION_UP
cleaner
description
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIScaleElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
IScriptableWatcher
object
invalidate
Returns void
isDirty
Returns boolean
refresh
Returns void
setTarget
Parameters
obj: object
Returns void
validate
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UIScrollElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
cleaner
curCount
curData
curExtra
curId
description
descriptionWatcher
elementName
elementRect
isDarken
isDarkenAtZero
isDirty
isTouched
isVisual
maxStackSize
size
slotName
source
textOverride
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
getMaxItemTransferAmount
Parameters
slot: ISlotElement
Returns number
getMaxStackSize
Returns number
invalidate
Returns void
isReleased
Returns boolean
isValidItem
Parameters
id: number
count: number
data: number
extra: ItemExtraData
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UISlotElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T = boolean
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UISwitchElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UITabElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
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
descriptionWatcher
elementName
elementRect
isDirty
isTouched
window
x
y
z
createTexture
Creates a new UI.Texture instance with specified style applied. See UI.Texture.constructor for parameters description.
Parameters
obj: BitmapTypes
Returns Texture
debug
Parameters
canvas: Canvas
scale: number
Returns void
getBinding
Gets any value from the element.
Type parameters
- T = any
Parameters
name: string
binding name, you can access the value from the element by this name; some binding names are reserved for additional element information, e.g.
"element_obj"
contains pointer to the current object and"element_rect"
contains android.graphics.Rect object containing drawing rectangle
Returns IElement | Rect | T
Value that was get from the element or
null
if the element doesn't exist.
getCleanerCopy
Returns IElementCleaner
invalidate
Returns void
isReleased
Returns boolean
onBindingUpdated
Type parameters
- T
Parameters
name: string
val: T
Returns void
onDraw
Parameters
canvas: Canvas
scale: number
Returns void
onRelease
Returns void
onReset
Returns void
onSetup
Type parameters
- T = UITextElement
Parameters
desc: T
Returns void
onTouchEvent
Parameters
event: ITouchEvent
Returns void
onTouchReleased
Parameters
event: ITouchEvent
Returns void
setBinding
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
Sets element's position in the window's unit coordinates.
Parameters
x: number
x position
y: number
y position
Returns void
setSize
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
container: UiAbstractContainer
elementName: string
Returns void
ITouchEvent
_x
_y
downX
downY
localX
localY
type
x
y
hasMovedSinceLastDown
Returns boolean
localPosAsScriptable
Returns { x: number; y: number }
x: number
y: number
posAsScriptable
Returns { x: number; y: number }
x: number
y: number
preparePosition
Parameters
win: Window
rect: Rect
Returns void
update
Parameters
event: MotionEvent
Returns void
IWindow
close
Closes window without container. Use only if the window was opened without container.
Returns void
frame
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 WindowContent
Window's content object (usually specified in the window's constructor).
getElements
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
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 passtrue
as the parameter
Returns void
invalidateElements
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 passtrue
as the parameter
Returns void
isDynamic
Returns boolean
true
if the window can change it's contents position.
isInventoryNeeded
Returns boolean
true
if the window has an inventory that should be updated.
isOpened
Returns boolean
true
if the window is opened,false
otherwise.
onBackPressed
Returns boolean
Whether the window can be closed on pressing back navigation button.
open
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
container: UiAbstractContainer
UI.Container to be associated with current window or null to associate no container with current window
Returns void
setDebugEnabled
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
optionalheight
Height of the window in units, by default calculated to match bottom screen bound.
optionalscrollX
Defines scrollable window size along the X axis.
optionalscrollY
Defines scrollable window size along the Y axis.
optionalwidth
Width of the window in units, by default calculated to match right screen bound.
optionalx
X coordinate of the window in units.
optionaly
Y coordinate of the window in units.
ImageDrawing
optionalbitmap
optionalheight
optionalscale
type
optionalwidth
optionalx
optionaly
LineDrawing
optionalcolor
type
optionalwidth
optionalx1
optionalx2
optionaly1
optionaly2
OnOpenCloseListener
Parameters
container: Container
UI.Container the window was opened in
window: IWindow
an instance of UI.IWindow that was opened
Returns void
StandardWindowBackgroundDescription
optionalbitmap
Background bitmap texture name. If the bitmap size doesn't match the screen size, bitmap will be stretched to fit.
optionalcolor
Background color integer value, produced by android.graphics.Color class.
optionalframe
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
If true
, default window is created.
optionalstandart
If true
, default window is created.
StandardWindowContent
Extended WindowContent object with additional params for UI.StandartWindow and UI.StandardWindow.
optionaldrawing
Array of drawings
optionalelements
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
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
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.
optionalstyle
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
StandardWindowDescription
optionalbackground
Specifies background properties.
optionalheader
Specifies additional parameters for standard window's header.
optionalinventory
Specifies parameters for standard inventory window.
optionalminHeight
Specifies minimum contents window height. If actual height is less then desired, scrolling is used.
StandardWindowHeaderDescription
optionalcolor
Header background color integer value, produced by android.graphics.Color class. Default is Color.rgb(0x72, 0x6a, 0x70).
optionalframe
Frame bitmap gui texture name. Defaults to "headerFrame" style binding or, if not specified, to "default_frame_7" gui texture.
optionalheight
Specifies header height in units.
optionalhideButton
If true
, close button is not displayed.
optionalhideShadow
Specifies whether the header should have shadow or not. If
true
, the shadow is not displayed.
optionaltext
Specifies header text styles and value.
optionalwidth
If height is not specified, used to specify header height in units.
StandardWindowHeaderTextDescription
optionalcolor
If font is not specified, used as color value.
optionalfont
Specifies font params for the header text, only StandardWindowHeaderTextDescription.size, StandardWindowHeaderTextDescription.color and StandardWindowHeaderTextDescription.shadow properties are used.
optionalshadow
If font is not specified, used as shadow value.
optionalsize
If font is not specified, used as size value.
optionaltext
Specifies header text.
StandardWindowInventoryDescription
optionalpadding
Specifies additional padding for the inventory in units. Defaults to 20 units.
optionalstandard
If true
, default window is created.
optionalwidth
Inventory width in units. Defaults to 300 units.
TabbedWindowContent
Specifies contents and additional parameters for all types of windows.
optionaldrawing
Array of drawings
optionalelements
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
optionallocation
Specifies window's location, used for UI.Window, UI.TabbedWindow and UI.StandartWindow.
optionalparams
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
optionalstyle
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
TextDrawing
optionalfont
optionaltext
type
optionalx
optionaly
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
optionalbitmap2
optionalclicker
optionalscale
type
optionalx
optionaly
optionalz
UIClickEvent
Object where you can specify how the UI element will behave on touch events.
optionalonClick
This function will be called when element is short touched.
Type declaration
Parameters
position: Vector
container: ItemContainer | UiAbstractContainer
tileEntity: any
window: IWindow
canvas: Canvas
scale: number
Returns void
optionalonLongClick
This function will be called when element is long touched.
Type declaration
Parameters
position: Vector
container: ItemContainer | UiAbstractContainer
tileEntity: any
window: IWindow
canvas: Canvas
scale: number
Returns void
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
optionalcustom
Type declaration
optionalonBindingUpdated?: <T>(element: ICustomElement, name: string, val: T) => void
Type parameters
- T
Parameters
element: ICustomElement
name: string
val: T
Returns void
optionalonContainerInit?: (element: ICustomElement, container: UiAbstractContainer, elementName: string) => void
Parameters
element: ICustomElement
container: UiAbstractContainer
elementName: string
Returns void
optionalonDraw?: (element: ICustomElement, cvs: Canvas, scale: number) => void
Parameters
element: ICustomElement
cvs: Canvas
scale: number
Returns void
optionalonRelease?: (element: ICustomElement) => void
Parameters
element: ICustomElement
Returns void
optionalonReset?: (element: ICustomElement) => void
Parameters
element: ICustomElement
Returns void
optionalonSetup?: (element: ICustomElement) => void
Parameters
element: ICustomElement
Returns void
optionalonTouchReleased?: (element: ICustomElement) => void
Parameters
element: ICustomElement
Returns void
type
optionalx
optionaly
optionalz
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
optionalx
optionaly
optionalz
UIFPSTextElement
optionalinterpolate
optionalperiod
type
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
optionalclicker
optionalcolor
optionalheight
optionalscale
optionalsides
type
optionalwidth
optionalx
optionaly
optionalz
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
optionalclicker
optionalheight
optionaloverlay
optionalscale
type
optionalwidth
optionalx
optionaly
optionalz
UIInvSlotElement
optionalindex
type
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
optionalbackgroundOffset
Type declaration
optionalx?: number
optionaly?: number
optionalbitmap
optionalclicker
optionaldirection
optionalheight
optionalinvert
optionaloverlay
optionaloverlayOffset
Type declaration
optionalx?: number
optionaly?: number
optionalpixelate
optionalscale
type
optionalvalue
optionalwidth
optionalx
optionaly
optionalz
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
optionalbindingProperty
optionalbitmapBg
optionalbitmapBgHover
optionalbitmapHandle
optionalbitmapHandleHover
optionalclicker
optionalconfigValue
optionaldivider
optionalisInt
optionallength
optionalmax
optionalmin
optionalonNewValue
Type declaration
Parameters
result: number
container: UiAbstractContainer
element: UIScrollElement
Returns void
optionalratio
type
optionalwidth
optionalx
optionaly
optionalz
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
optionalclicker
optionaldarken
optionaldisablePixelPerfect
optionaliconScale
optionalisDarkenAtZero
optionalisTransparentBackground
optionalisValid
Type declaration
Parameters
id: number
count: number
data: number
container: Container
item: ItemInstance
Returns boolean
optionalmaxStackSize
optionalneedClean
optionalonItemChanged
Type declaration
Parameters
container: UiAbstractContainer
oldId: number
oldCount: number
oldData: number
Returns void
optionalsize
optionalsource
optionaltext
type
optionalvisual
optionalx
optionaly
optionalz
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
optionalbindingProperty
optionalbitmapOff
optionalbitmapOffHover
optionalbitmapOn
optionalbitmapOnHover
optionalclicker
optionalconfigValue
optionalonNewState
Type declaration
Parameters
val: boolean
container: UiAbstractContainer
element: UISwitchElement
Returns void
optionalscale
type
optionalx
optionaly
optionalz
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
optionaldeselectedColor
optionalisAlwaysSelected
optionalisSelected
optionalselectedColor
optionaltabIndex
type
optionalx
optionaly
optionalz
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
optionalfont
optionalformat
optionalformatMaxCharsPerLine
optionalmultiline
optionaltext
type
optionalx
optionaly
optionalz
UiAbstractContainer
addElementInstance
Parameters
element: IElement
name: string
Returns void
close
Returns void
getBinding
Type parameters
- T = any
Parameters
element: string
bindingName: string
Returns IElement | T | Rect
getElement
Parameters
elementName: string
Returns IElement
getParent
Returns any
getSlotVisualImpl
Parameters
slotName: string
Returns UiVisualSlotImpl
handleBindingDirty
Parameters
element: string
bindingName: string
Returns void
handleInventoryToSlotTransaction
Parameters
inventorySlot: number
slot: string
amount: number
Returns void
handleSlotToInventoryTransaction
Parameters
slot: string
amount: number
Returns void
handleSlotToSlotTransaction
Parameters
slot1: string
slot2: string
amount: number
Returns void
onWindowClosed
Returns void
openAs
Parameters
window: IWindow
Returns void
setBinding
Type parameters
- T
Parameters
element: string
bindingName: string
obj: T
Returns void
UiVisualSlotImpl
getCount
Returns number
getData
Returns number
getExtra
Returns ItemExtraData
getId
Returns number
WindowContent
Specifies contents and additional parameters for all types of windows.
optionaldrawing
Array of drawings
optionalelements
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
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
optionalstyle
Specifies window's style, an object containing keys as style binding names and values as gui texture names corresponding to the binding.
WindowEventListener
Object used to handle windows opening and closing events.
optionalonClose
optionalonOpen
WindowLocationDescription
Object representing window location used in window content object and UI.WindowLocation constructor.
optionalforceScrollX
optionalforceScrollY
optionalglobalScale
Determines whether the interface needs to be resized based on its size or a global unit system should be used.
optionalheight
Height of the window in units, by default calculated to match bottom screen bound.
optionalpadding
Paddings are distances from the window bounds to the elements in the window.
Type declaration
optionalbottom?: number
optionalleft?: number
optionalright?: number
optionaltop?: number
optionalscrollX
Defines scrollable window size along the X axis.
optionalscrollY
Defines scrollable window size along the Y axis.
optionalwidth
Width of the window in units, by default calculated to match right screen bound.
optionalx
X coordinate of the window in units.
optionaly
Y coordinate of the window in units.
Type Aliases
BindingSet
Object containing binding names as keys and string values as gui textures names.
Type declaration
[key string]: string
BitmapTypes
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
Element
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
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
TouchEventType
UICloseButtonElement
WindowLocationParams
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.
Returns android.app.Activity
getMinecraftUiScale
Determines the overall size of game interface, which can vary depending on specific settings that are in place.
Returns number
getRelMinecraftUiScale
Defines the size of interface relative to the UI.getMinecraftUiScale, with dimensions specified in units used within Inner Core interfaces.
Returns number
getScreenHeight
Returns number
Screen height in units.
getScreenRelativeHeight
Same as UI.getScreenHeight.
Returns number
Class representing several windows opened at the same. For example, UI.StandardWindow is a window group that consists of several separate windows.