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

UI.WindowLocation

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

Index

Constructors

constructor

Properties

forceScrollX

forceScrollX: boolean

forceScrollY

forceScrollY: boolean

globalScale
since: 2.3.1b115

globalScale: boolean

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

height

height: number

Window height.

scale

scale: number

Window scale.

scrollX

scrollX: number

Horizontal window scroll.

scrollY

scrollY: number

Vertical window scroll.

width

width: number

Window width.

x

x: number

Window horizontal position.

y

y: number

Window vertical position.

zIndex

zIndex: number

Window position on layers.

staticreadonlyPADDING_BOTTOM

PADDING_BOTTOM: number

Constant used to represent bottom padding.

staticreadonlyPADDING_LEFT

PADDING_LEFT: number

Constant used to represent left padding.

staticreadonlyPADDING_RIGHT

PADDING_RIGHT: number

Constant used to represent right padding.

staticreadonlyPADDING_TOP

PADDING_TOP: number

Constant used to represent top padding.

Methods

asScriptable

  • Returns IWindowLocation

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

copy

getDrawingScale

  • getDrawingScale(): number
  • Returns number

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

getLayoutParams

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

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

    Returns LayoutParams

getRect

  • Returns Rect

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

getScale

  • getScale(): number
  • Returns number

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

getWindowHeight

  • getWindowHeight(): number
  • Returns number

    Window's height in units.

getWindowWidth

  • getWindowWidth(): 1000
  • Returns 1000

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

globalToWindow

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


    Parameters

    • val: number

      value to be transformed

    Returns number

removeScroll

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


    Returns void

set

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


    Parameters

    • x: number

      X coordinate of the window

    • y: number

      Y coordinate of the window

    • width: number

      width of the window

    • height: number

      height of the window

    Returns void

setPadding

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

setScroll

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


    Parameters

    • x: number

      scrollable window size along the X axis

    • y: number

      scrollable window size along the Y axis

    Returns void

setSize

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


    Parameters

    • x: number

      window's width

    • y: number

      window's height

    Returns void

setZ

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


    Parameters

    • z: number

      window Z index

    Returns void

setupAndShowPopupWindow

showPopupWindow

updatePopupWindow

windowToGlobal

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


    Parameters

    • val: number

      value to be transformed

    Returns number