daRg

module ‘daRg’

Source files:

prog/gameLibs/daRg/scriptBinding.cpp prog/gameLibs/daRg/elementRef.cpp prog/gameLibs/daRg/guiScene.cpp prog/gameLibs/daRg/stdRendObj.cpp prog/gameLibs/daRg/lottiePicture.cpp prog/gameLibs/daRg/robjWorldBlur.cpp

Usage:

let { FLOW_PARENT_RELATIVE, FLOW_HORIZONTAL, FLOW_VERTICAL, ALIGN_LEFT, ALIGN_TOP, ALIGN_RIGHT, ALIGN_BOTTOM, ALIGN_CENTER, VECTOR_WIDTH, VECTOR_COLOR, VECTOR_FILL_COLOR, VECTOR_MID_COLOR, VECTOR_OUTER_LINE, VECTOR_CENTER_LINE, VECTOR_INNER_LINE, VECTOR_TM_OFFSET, VECTOR_TM_SCALE, VECTOR_LINE, VECTOR_LINE_INDENT_PX, VECTOR_LINE_INDENT_PCT, VECTOR_ELLIPSE, VECTOR_SECTOR, VECTOR_RECTANGLE, VECTOR_POLY, VECTOR_INVERSE_POLY, VECTOR_OPACITY, VECTOR_LINE_DASHED, VECTOR_NOP, VECTOR_QUADS, FFT_NONE, FFT_SHADOW, FFT_GLOW, FFT_BLUR, FFT_OUTLINE, O_HORIZONTAL, O_VERTICAL, TOVERFLOW_CLIP, TOVERFLOW_CHAR, TOVERFLOW_WORD, TOVERFLOW_LINE, DIR_UP, DIR_DOWN, DIR_LEFT, DIR_RIGHT, EVENT_BREAK, EVENT_CONTINUE, GESTURE_DETECTOR_DRAG, GESTURE_DETECTOR_PINCH, GESTURE_DETECTOR_ROTATE, Linear, InQuad, OutQuad, InOutQuad, InCubic, OutCubic, InOutCubic, InQuintic, OutQuintic, InOutQuintic, InQuart, OutQuart, InOutQuart, InSine, OutSine, InOutSine, InCirc, OutCirc, InOutCirc, InExp, OutExp, InOutExp, InElastic, OutElastic, InOutElastic, InBack, OutBack, InOutBack, InBounce, OutBounce, InOutBounce, InOutBezier, CosineFull, InStep, OutStep, Blink, DoubleBlink, BlinkSin, BlinkCos, Discrete8, Shake4, Shake6, S_KB_FOCUS, S_HOVER, S_TOP_HOVER, S_ACTIVE, S_MOUSE_ACTIVE, S_KBD_ACTIVE, S_HOTKEY_ACTIVE, S_TOUCH_ACTIVE, S_JOYSTICK_ACTIVE, S_VR_ACTIVE, S_DRAG, MR_NONE, MR_T, MR_R, MR_B, MR_L, MR_LT, MR_RT, MR_LB, MR_RB, MR_AREA, FMT_NO_WRAP, FMT_KEEP_SPACES, FMT_IGNORE_TAGS, FMT_HIDE_ELLIPSIS, FMT_AS_IS, DEVID_KEYBOARD, DEVID_MOUSE, DEVID_JOYSTICK, DEVID_TOUCH, DEVID_VR, KEEP_ASPECT_NONE, KEEP_ASPECT_FIT, KEEP_ASPECT_FILL, AXIS_L_THUMB_H, AXIS_L_THUMB_V, AXIS_R_THUMB_H, AXIS_R_THUMB_V, AXIS_L_TRIGGER, AXIS_R_TRIGGER, AXIS_LR_TRIGGER, XMB_STOP, XMB_CONTINUE, R_PROCESSED, SIZE_TO_CONTENT, Fonts, AnimProp, color, bgColor, fgColor, fillColor, borderColor, opacity, rotate, scale, translate, fValue, picSaturate, brightness, ScrollHandler, JoystickAxisObservable, ElemGroup, Behavior, Picture, PictureImmediate, FormattedText, IGenVideoPlayer, IGenSound, DragAndDropState, EventDataRect, MouseClickEventData, HotkeyEventData, HoverEventData, TransitAll, MoveToAreaTarget, Color, sw, sh, flex, fontH, pw, ph, elemw, elemh, locate_element_source, get_element_info, resolve_button, get_font_metrics, setFontDefHt, getFontDefHt, getFontInitialHt, calc_str_box, ElementRef, KBD_BIT_CAPS_LOCK, KBD_BIT_NUM_LOCK, KBD_BIT_SCROLL_LOCK, PANEL_ANCHOR_NONE, PANEL_ANCHOR_SCENE, PANEL_ANCHOR_VRSPACE, PANEL_ANCHOR_HEAD, PANEL_ANCHOR_LEFTHAND, PANEL_ANCHOR_RIGHTHAND, PANEL_ANCHOR_ENTITY, PANEL_GEOMETRY_NONE, PANEL_GEOMETRY_RECTANGLE, PANEL_RC_NONE, PANEL_RC_FACE_LEFT_HAND, PANEL_RC_FACE_RIGHT_HAND, PANEL_RC_FACE_HEAD, PANEL_RC_FACE_HEAD_LOCK_Y, PANEL_RC_FACE_ENTITY, PANEL_RC_FACE_HEAD_LOCK_PLAYSPACE_Y, PANEL_RENDER_CAST_SHADOW, PANEL_RENDER_OPAQUE, PANEL_RENDER_ALWAYS_ON_TOP, MAIN_SCREEN_ID, GuiScene, SceneConfig, anim_start, anim_request_stop, anim_skip, anim_skip_delay, set_kb_focus, capture_kb_focus, calc_comp_size, move_mouse_cursor, get_mouse_cursor_pos, resolve_button_id, gui_scene, ROBJ_SOLID, ROBJ_DEBUG, ROBJ_TEXT, ROBJ_TEXTAREA, ROBJ_INSCRIPTION, ROBJ_IMAGE, ROBJ_VECTOR_CANVAS, ROBJ_9RECT, ROBJ_PROGRESS_LINEAR, ROBJ_PROGRESS_CIRCULAR, ROBJ_BOX, ROBJ_MOVIE, ROBJ_MASK, ROBJ_DAS_CANVAS, LottieAnimation, ROBJ_WORLD_BLUR, ROBJ_WORLD_BLUR_PANEL } = require("daRg")

or:

from "daRg" import *
//'daRg' exports:
{
  const FLOW_PARENT_RELATIVE
  const FLOW_HORIZONTAL
  const FLOW_VERTICAL
  const ALIGN_LEFT
  const ALIGN_TOP
  const ALIGN_RIGHT
  const ALIGN_BOTTOM
  const ALIGN_CENTER
  const VECTOR_WIDTH
  const VECTOR_COLOR
  const VECTOR_FILL_COLOR
  const VECTOR_MID_COLOR
  const VECTOR_OUTER_LINE
  const VECTOR_CENTER_LINE
  const VECTOR_INNER_LINE
  const VECTOR_TM_OFFSET
  const VECTOR_TM_SCALE
  const VECTOR_LINE
  const VECTOR_LINE_INDENT_PX
  const VECTOR_LINE_INDENT_PCT
  const VECTOR_ELLIPSE
  const VECTOR_SECTOR
  const VECTOR_RECTANGLE
  const VECTOR_POLY
  const VECTOR_INVERSE_POLY
  const VECTOR_OPACITY
  const VECTOR_LINE_DASHED
  const VECTOR_NOP
  const VECTOR_QUADS
  const FFT_NONE
  const FFT_SHADOW
  const FFT_GLOW
  const FFT_BLUR
  const FFT_OUTLINE
  const O_HORIZONTAL
  const O_VERTICAL
  const TOVERFLOW_CLIP
  const TOVERFLOW_CHAR
  const TOVERFLOW_WORD
  const TOVERFLOW_LINE
  const DIR_UP
  const DIR_DOWN
  const DIR_LEFT
  const DIR_RIGHT
  const EVENT_BREAK
  const EVENT_CONTINUE
  const GESTURE_DETECTOR_DRAG
  const GESTURE_DETECTOR_PINCH
  const GESTURE_DETECTOR_ROTATE
  const Linear
  const InQuad
  const OutQuad
  const InOutQuad
  const InCubic
  const OutCubic
  const InOutCubic
  const InQuintic
  const OutQuintic
  const InOutQuintic
  const InQuart
  const OutQuart
  const InOutQuart
  const InSine
  const OutSine
  const InOutSine
  const InCirc
  const OutCirc
  const InOutCirc
  const InExp
  const OutExp
  const InOutExp
  const InElastic
  const OutElastic
  const InOutElastic
  const InBack
  const OutBack
  const InOutBack
  const InBounce
  const OutBounce
  const InOutBounce
  const InOutBezier
  const CosineFull
  const InStep
  const OutStep
  const Blink
  const DoubleBlink
  const BlinkSin
  const BlinkCos
  const Discrete8
  const Shake4
  const Shake6
  const S_KB_FOCUS
  const S_HOVER
  const S_TOP_HOVER
  const S_ACTIVE
  const S_MOUSE_ACTIVE
  const S_KBD_ACTIVE
  const S_HOTKEY_ACTIVE
  const S_TOUCH_ACTIVE
  const S_JOYSTICK_ACTIVE
  const S_VR_ACTIVE
  const S_DRAG
  const MR_NONE
  const MR_T
  const MR_R
  const MR_B
  const MR_L
  const MR_LT
  const MR_RT
  const MR_LB
  const MR_RB
  const MR_AREA
  const FMT_NO_WRAP
  const FMT_KEEP_SPACES
  const FMT_IGNORE_TAGS
  const FMT_HIDE_ELLIPSIS
  const FMT_AS_IS
  const DEVID_KEYBOARD
  const DEVID_MOUSE
  const DEVID_JOYSTICK
  const DEVID_TOUCH
  const DEVID_VR
  const KEEP_ASPECT_NONE
  const KEEP_ASPECT_FIT
  const KEEP_ASPECT_FILL
  const AXIS_L_THUMB_H
  const AXIS_L_THUMB_V
  const AXIS_R_THUMB_H
  const AXIS_R_THUMB_V
  const AXIS_L_TRIGGER
  const AXIS_R_TRIGGER
  const AXIS_LR_TRIGGER
  const XMB_STOP
  const XMB_CONTINUE
  const R_PROCESSED
  const SIZE_TO_CONTENT
  class Fonts
  enum AnimProp
  value color
  value bgColor
  value fgColor
  value fillColor
  value borderColor
  value opacity
  value rotate
  value scale
  value translate
  value fValue
  value picSaturate
  value brightness
  class ScrollHandler
  class JoystickAxisObservable
  class ElemGroup
  class Behavior
  class Picture
  class PictureImmediate
  class FormattedText
  class IGenVideoPlayer
  class IGenSound
  class DragAndDropState
  class EventDataRect
  class MouseClickEventData
  class HotkeyEventData
  class HoverEventData
  class TransitAll
  class MoveToAreaTarget
  pure function Color(r = null, g = null, b = null, alpha = null): number, number, number, number -> int
  pure function sw(percent = null): number -> number
  pure function sh(percent = null): number -> number
  pure function flex(weight = null): number -> userdata
  function fontH(arg0): integer_or_float -> _undocumented_
  pure function pw(percent = null): number -> userdata
  pure function ph(percent = null): number -> userdata
  pure function elemw(percent = null): number -> userdata
  pure function elemh(percent = null): number -> userdata
  function locate_element_source(arg0): class_instance -> _undocumented_
  function get_element_info(arg0): class_instance -> _undocumented_
  function resolve_button(arg0): string -> _undocumented_
  pure function get_font_metrics(fontId = null, fontHt = null, fontId, fontHt): int, number, integer, float -> table
  function setFontDefHt(font_name, pix_ht): string, integer -> bool
  function getFontDefHt(font_name): string -> integer
  function getFontInitialHt(font_name): string -> integer
  function calc_str_box(element_or_text, element_or_style): string|closure_and_nativeclosure|table, table|closure_and_nativeclosure|null -> array
  class ElementRef
  const KBD_BIT_CAPS_LOCK
  const KBD_BIT_NUM_LOCK
  const KBD_BIT_SCROLL_LOCK
  const PANEL_ANCHOR_NONE
  const PANEL_ANCHOR_SCENE
  const PANEL_ANCHOR_VRSPACE
  const PANEL_ANCHOR_HEAD
  const PANEL_ANCHOR_LEFTHAND
  const PANEL_ANCHOR_RIGHTHAND
  const PANEL_ANCHOR_ENTITY
  const PANEL_GEOMETRY_NONE
  const PANEL_GEOMETRY_RECTANGLE
  const PANEL_RC_NONE
  const PANEL_RC_FACE_LEFT_HAND
  const PANEL_RC_FACE_RIGHT_HAND
  const PANEL_RC_FACE_HEAD
  const PANEL_RC_FACE_HEAD_LOCK_Y
  const PANEL_RC_FACE_ENTITY
  const PANEL_RC_FACE_HEAD_LOCK_PLAYSPACE_Y
  const PANEL_RENDER_CAST_SHADOW
  const PANEL_RENDER_OPAQUE
  const PANEL_RENDER_ALWAYS_ON_TOP
  const MAIN_SCREEN_ID
  class GuiScene
  class SceneConfig
  function anim_start()
  function anim_request_stop()
  function anim_skip()
  function anim_skip_delay()
  function set_kb_focus()
  function capture_kb_focus()
  function calc_comp_size(arg0): null or table or closure_and_nativeclosure or class_instance or class -> _undocumented_
  function move_mouse_cursor(arg0, arg1, ...): any_type, bool, any_type -> _undocumented_
  function get_mouse_cursor_pos(arg0, ...): class_instance, any_type -> _undocumented_
  function resolve_button_id(arg0): string -> _undocumented_
  value gui_scene
  const ROBJ_SOLID
  const ROBJ_DEBUG
  const ROBJ_TEXT
  const ROBJ_TEXTAREA
  const ROBJ_INSCRIPTION
  const ROBJ_IMAGE
  const ROBJ_VECTOR_CANVAS
  const ROBJ_9RECT
  const ROBJ_PROGRESS_LINEAR
  const ROBJ_PROGRESS_CIRCULAR
  const ROBJ_BOX
  const ROBJ_MOVIE
  const ROBJ_MASK
  const ROBJ_DAS_CANVAS
  class LottieAnimation
  const ROBJ_WORLD_BLUR
  const ROBJ_WORLD_BLUR_PANEL
}
const FLOW_PARENT_RELATIVE
const FLOW_HORIZONTAL
const FLOW_VERTICAL
const ALIGN_LEFT = ALIGN_LEFT
const ALIGN_TOP = ALIGN_TOP
const ALIGN_RIGHT = ALIGN_RIGHT
const ALIGN_BOTTOM = ALIGN_BOTTOM
const ALIGN_CENTER = ALIGN_CENTER
const VECTOR_WIDTH
const VECTOR_COLOR
const VECTOR_FILL_COLOR
const VECTOR_MID_COLOR
const VECTOR_OUTER_LINE
const VECTOR_CENTER_LINE
const VECTOR_INNER_LINE
const VECTOR_TM_OFFSET
const VECTOR_TM_SCALE
const VECTOR_LINE
const VECTOR_LINE_INDENT_PX
const VECTOR_LINE_INDENT_PCT
const VECTOR_ELLIPSE
const VECTOR_SECTOR
const VECTOR_RECTANGLE
const VECTOR_POLY
const VECTOR_INVERSE_POLY
const VECTOR_OPACITY
const VECTOR_LINE_DASHED
const VECTOR_NOP
const VECTOR_QUADS
const FFT_NONE
const FFT_SHADOW
const FFT_GLOW
const FFT_BLUR
const FFT_OUTLINE
const O_HORIZONTAL
const O_VERTICAL
const TOVERFLOW_CLIP
const TOVERFLOW_CHAR
const TOVERFLOW_WORD
const TOVERFLOW_LINE
const DIR_UP
const DIR_DOWN
const DIR_LEFT
const DIR_RIGHT
const EVENT_BREAK = GuiScene::EVENT_BREAK
const EVENT_CONTINUE = GuiScene::EVENT_CONTINUE
const GESTURE_DETECTOR_DRAG = GestureDetector::Type::DRAG
const GESTURE_DETECTOR_PINCH = GestureDetector::Type::PINCH
const GESTURE_DETECTOR_ROTATE = GestureDetector::Type::ROTATE
const Linear

Easing function for prebuilt animations functions.

const InQuad

Easing function for prebuilt animations functions.

const OutQuad

Easing function for prebuilt animations functions. See https://easings.net/

const InOutQuad

Easing function for prebuilt animations functions.

const InCubic

Easing function for prebuilt animations functions.

const OutCubic

Easing function for prebuilt animations functions.

const InOutCubic

Easing function for prebuilt animations functions.

const InQuintic

Easing function for prebuilt animations functions.

const OutQuintic

Easing function for prebuilt animations functions.

const InOutQuintic

Easing function for prebuilt animations functions.

const InQuart

Easing function for prebuilt animations functions.

const OutQuart

Easing function for prebuilt animations functions.

const InOutQuart

Easing function for prebuilt animations functions.

const InSine

Easing function for prebuilt animations functions.

const OutSine

Easing function for prebuilt animations functions.

const InOutSine

Easing function for prebuilt animations functions.

const InCirc

Easing function for prebuilt animations functions.

const OutCirc

Easing function for prebuilt animations functions.

const InOutCirc

Easing function for prebuilt animations functions.

const InExp

Easing function for prebuilt animations functions.

const OutExp

Easing function for prebuilt animations functions.

const InOutExp

Easing function for prebuilt animations functions.

const InElastic

Easing function for prebuilt animations functions.

const OutElastic

Easing function for prebuilt animations functions.

const InOutElastic

Easing function for prebuilt animations functions.

const InBack

Easing function for prebuilt animations functions.

const OutBack

Easing function for prebuilt animations functions.

const InOutBack

Easing function for prebuilt animations functions.

const InBounce

Easing function for prebuilt animations functions.

const OutBounce

Easing function for prebuilt animations functions.

const InOutBounce

Easing function for prebuilt animations functions.

const InOutBezier

Easing function for prebuilt animations functions.

const CosineFull

Easing function for prebuilt animations functions.

const InStep

Easing function for prebuilt animations functions.

const OutStep

Easing function for prebuilt animations functions.

Easing function for prebuilt animations functions.

Easing function for prebuilt animations functions.

const BlinkSin

Easing function for prebuilt animations functions.

const BlinkCos

Easing function for prebuilt animations functions.

const Discrete8

Easing function for prebuilt animations functions.

const Shake4

Easing function for prebuilt animations functions.

const Shake6

Easing function for prebuilt animations functions.

const S_KB_FOCUS

State flag for keyboard focus.

const S_HOVER
const S_TOP_HOVER
const S_ACTIVE

state flag for ‘pressed’ button.

const S_MOUSE_ACTIVE

state flag for ‘pressed’ button with mouse.

const S_KBD_ACTIVE

state flag for ‘pressed’ button with keyboard.

const S_HOTKEY_ACTIVE

state flag for ‘pressed’ button with hotkey.

const S_TOUCH_ACTIVE

state flag for pressed button with touch device.

const S_JOYSTICK_ACTIVE

state flag for pressed button with joystick/gamepad device.

const S_VR_ACTIVE

state flag for pressed button with VR controller.

const S_DRAG

state flag for dragged state.

const MR_NONE

.MOVE_RESIZE Beahvior constants, to define where was point started move or resize

const MR_T
const MR_R
const MR_B
const MR_L
const MR_LT
const MR_RT
const MR_LB
const MR_RB
const MR_AREA
const FMT_NO_WRAP
const FMT_KEEP_SPACES
const FMT_IGNORE_TAGS
const FMT_HIDE_ELLIPSIS
const FMT_AS_IS
const DEVID_KEYBOARD
const DEVID_MOUSE
const DEVID_JOYSTICK
const DEVID_TOUCH
const DEVID_VR
const KEEP_ASPECT_NONE
const KEEP_ASPECT_FIT
const KEEP_ASPECT_FILL
const AXIS_L_THUMB_H
const AXIS_L_THUMB_V
const AXIS_R_THUMB_H
const AXIS_R_THUMB_V
const AXIS_L_TRIGGER
const AXIS_R_TRIGGER
const AXIS_LR_TRIGGER
const XMB_STOP
const XMB_CONTINUE
const R_PROCESSED
const SIZE_TO_CONTENT

class Fonts

has values of each fonts that are registered in dagor. unfortunately no way for list of fonts, see fonts.blk

enum AnimProp

color
bgColor
fgColor
fillColor
borderColor
opacity
rotate
scale
translate
fValue
picSaturate
brightness

class ScrollHandler

ScrollHandler()

nparamscheck:1

typecheck mask: class_instance

method ScrollHandler.scrollToX()
method ScrollHandler.scrollToY()
method ScrollHandler.scrollToChildren()
property ScrollHandler.elem

readonly

class JoystickAxisObservable

method JoystickAxisObservable.get()
property JoystickAxisObservable.value

readonly

var JoystickAxisObservable.resolution
var JoystickAxisObservable.deadzone

class ElemGroup

class Behavior

class Picture

Picture(arg0)
Arguments:
  • arg0 (null or string()) – autodoc from typemask/paramscheck

typecheck mask: any_type, null or string

method Picture.getLoadedPicSize()

class PictureImmediate extends Picture

PictureImmediate(arg0)
Arguments:
  • arg0 (null or string()) – autodoc from typemask/paramscheck

typecheck mask: any_type, null or string

method PictureImmediate.getLoadedPicSize()

class FormattedText

class IGenVideoPlayer

class IGenSound

class DragAndDropState

class EventDataRect

EventDataRect.l
EventDataRect.t
EventDataRect.r
EventDataRect.b

class MouseClickEventData

property MouseClickEventData.targetRect

readonly

class HotkeyEventData

property HotkeyEventData.targetRect

readonly

class HoverEventData

property HoverEventData.targetRect

readonly

class TransitAll

TransitAll()

class MoveToAreaTarget

method MoveToAreaTarget.set()
method MoveToAreaTarget.clear()
MoveToAreaTarget.ElemGroup
MoveToAreaTarget.ScrollHandler
MoveToAreaTarget.Picture
MoveToAreaTarget.PictureImmediate
MoveToAreaTarget.TransitAll
MoveToAreaTarget.MoveToAreaTarget
pure function Color(r = null, g = null, b = null, alpha = null)
Arguments:
  • r (number, optional())

  • g (number, optional())

  • b (number, optional())

  • alpha (number, optional())

typecheck mask: integer_or_float, integer_or_float, integer_or_float, integer_or_float

Returns:

int

pure function sw(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

number

pure function sh(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

number

pure function flex(weight = null)
Arguments:
  • weight (number, optional())

typecheck mask: integer_or_float

Returns:

userdata

function fontH(arg0)
Arguments:
  • arg0 (integer_or_float()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, integer_or_float

pure function pw(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

userdata

pure function ph(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

userdata

pure function elemw(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

userdata

pure function elemh(percent = null)
Arguments:
  • percent (number, optional())

typecheck mask: integer_or_float

Returns:

userdata

function locate_element_source(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, class_instance

function get_element_info(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, class_instance

function resolve_button(arg0)
Arguments:
  • arg0 (string()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, string

pure function get_font_metrics(fontId = null, fontHt = null, fontId, fontHt)
Arguments:
  • fontId (integer())

  • fontHt (float())

  • fontId

  • fontHt – optional, default is _def_fontHt font height set in font

typecheck mask: integer, integer_or_float

Returns:

font_params

Return type:

table

font_params
{
  _def_fontHt : def height
  fontHt : height
  capsHt : height of H
  lineSpacing : linespacing
  ascent
  descent
  lowercaseHeight : height of x
}
function setFontDefHt(font_name, pix_ht)
Arguments:
  • font_name (string())

  • pix_ht (integer())

Returns:

bool

function getFontDefHt(font_name)
Arguments:
  • font_name (string())

Returns:

integer

function getFontInitialHt(font_name)
Arguments:
  • font_name (string())

Returns:

integer

function calc_str_box(element_or_text, element_or_style)
Arguments:
  • element_or_text (string|closure_and_nativeclosure|table()) – should be string of text or darg component description with ‘text’ in it

  • element_or_style (table|closure_and_nativeclosure|null()) – optional, if first element is text, it should be provided with font properties

nparamscheck:-2

typecheck mask: any_type, string or table or closure_and_nativeclosure, table or closure_and_nativeclosure or null

Returns:

return array of two objects with width and height of text

Return type:

array

class ElementRef

method ElementRef.getCompDesc()
method ElementRef.getScreenPosX(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getScreenPosY(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getWidth(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getHeight(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getContentWidth(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getContentHeight(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getScrollOffsX(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getScrollOffsY(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

method ElementRef.getOverScrollOffsY(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

const KBD_BIT_CAPS_LOCK = 1
const KBD_BIT_NUM_LOCK = 2
const KBD_BIT_SCROLL_LOCK = 4
const PANEL_ANCHOR_NONE = int
const PANEL_ANCHOR_SCENE = int
const PANEL_ANCHOR_VRSPACE = int
const PANEL_ANCHOR_HEAD = int
const PANEL_ANCHOR_LEFTHAND = int
const PANEL_ANCHOR_RIGHTHAND = int
const PANEL_ANCHOR_ENTITY = int
const PANEL_GEOMETRY_NONE = int
const PANEL_GEOMETRY_RECTANGLE = int
const PANEL_RC_NONE = int
const PANEL_RC_FACE_LEFT_HAND = int
const PANEL_RC_FACE_RIGHT_HAND = int
const PANEL_RC_FACE_HEAD = int
const PANEL_RC_FACE_HEAD_LOCK_Y = int
const PANEL_RC_FACE_ENTITY = int
const PANEL_RC_FACE_HEAD_LOCK_PLAYSPACE_Y = int
const PANEL_RENDER_CAST_SHADOW = int
const PANEL_RENDER_OPAQUE = int
const PANEL_RENDER_ALWAYS_ON_TOP = int
const MAIN_SCREEN_ID = int

class GuiScene

method GuiScene.setUpdateHandler(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (closure_and_nativeclosure or null()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, closure_and_nativeclosure or null

method GuiScene.setShutdownHandler(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (closure_and_nativeclosure or null()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, closure_and_nativeclosure or null

method GuiScene.setHotkeysNavHandler(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (closure_and_nativeclosure or null()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, closure_and_nativeclosure or null

method GuiScene.addPanel(arg0, arg1, arg2)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (integer()) – autodoc from typemask/paramscheck

  • arg2 (closure_and_nativeclosure or table()) – autodoc from typemask/paramscheck

nparamscheck:3

typecheck mask: class_instance, integer, closure_and_nativeclosure or table

method GuiScene.removePanel(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (integer()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, integer

method GuiScene.mark_panel_dirty(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (integer()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, integer

method GuiScene.setXmbFocus(arg0, arg1, ...)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (null or table()) – autodoc from typemask/paramscheck

  • ... (any_type()) – this function accepts unlimited arguments

nparamscheck:-2

typecheck mask: class_instance, null or table

method GuiScene.getCompAABBbyKey()
method GuiScene.setConfigProps(arg0, arg1)
Arguments:
  • arg0 (any_type()) – autodoc from typemask/paramscheck

  • arg1 (table()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, table

method GuiScene.setFocusedScreen()
property GuiScene.focusedScreenId

readonly

method GuiScene.haveActiveCursorOnPanels()
method GuiScene.clearTimer()
property GuiScene.config

readonly

method GuiScene.getAllObservables()
property GuiScene.cursorPresent

readonly

property GuiScene.cursorOverStickScroll

readonly

property GuiScene.cursorOverClickable

readonly

property GuiScene.hoveredClickableInfo

readonly

property GuiScene.keyboardLayout

readonly

property GuiScene.keyboardLocks

readonly

property GuiScene.updateCounter

readonly

property GuiScene.circleButtonAsAction

readonly

property GuiScene.xmbMode

readonly

method GuiScene.getJoystickAxis()
method GuiScene.enableInput()
method GuiScene.forceCursorActive(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (bool or null()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, bool or null

class SceneConfig

var SceneConfig.defaultFont
var SceneConfig.defaultFontSize
var SceneConfig.kbCursorControl
var SceneConfig.gamepadCursorControl
var SceneConfig.gamepadStickAsDirpad
var SceneConfig.ignorePointerVisibilityForHovers
var SceneConfig.gamepadCursorSpeed
var SceneConfig.gamepadCursorHoverMaxTime
var SceneConfig.gamepadCursorAxisV
var SceneConfig.gamepadCursorAxisH
var gamepadCursorHoverMinMul
var SceneConfig.gamepadCursorHoverMaxMul
var SceneConfig.gamepadCursorDeadZone
var SceneConfig.gamepadCursorNonLin
var SceneConfig.reportNestedWatchedUpdate
var SceneConfig.joystickScrollAxisH
var SceneConfig.joystickScrollAxisV
var SceneConfig.clickRumbleEnabled
var SceneConfig.clickRumbleLoFreq
var SceneConfig.clickRumbleHiFreq
var SceneConfig.clickRumbleDuration
var SceneConfig.dirPadRepeatDelay
var SceneConfig.dirPadRepeatTime
var SceneConfig.useDefaultCursor
var SceneConfig.defaultCursor
var SceneConfig.clickPriority
var SceneConfig.moveClickThreshold
property SceneConfig.defSceneBgColor
property SceneConfig.defTextColor
method SceneConfig.setClickButtons(arg0, arg1)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • arg1 (array()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: class_instance, array

method SceneConfig.getClickButtons(arg0)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

nparamscheck:1

typecheck mask: class_instance

function anim_start()
function anim_request_stop()
function anim_skip()
function anim_skip_delay()
function set_kb_focus()
function capture_kb_focus()
function calc_comp_size(arg0)
Arguments:
  • arg0 (null or table or closure_and_nativeclosure or class_instance or class()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, null or table or closure_and_nativeclosure or class_instance or class

function move_mouse_cursor(arg0, arg1, ...)
Arguments:
  • arg0 (any_type()) – autodoc from typemask/paramscheck

  • arg1 (bool()) – autodoc from typemask/paramscheck

  • ... (any_type()) – this function accepts unlimited arguments

nparamscheck:-2

typecheck mask: any_type, any_type, bool

function get_mouse_cursor_pos(arg0, ...)
Arguments:
  • arg0 (class_instance()) – autodoc from typemask/paramscheck

  • ... (any_type()) – this function accepts unlimited arguments

nparamscheck:-1

typecheck mask: any_type, class_instance

function resolve_button_id(arg0)
Arguments:
  • arg0 (string()) – autodoc from typemask/paramscheck

nparamscheck:2

typecheck mask: any_type, string

gui_scene = instance of GuiScene

type: GuiScene

const ROBJ_SOLID

Renders a solid color rectangle.

Properties:
color: int or Color (default: 0xFFFFFFFF)
brightness: float (default: 1.0, range: 0.0 to 1.0)
const ROBJ_DEBUG

Renders a debug rectangle with diagonal cross-lines.

const ROBJ_TEXT

Render single line text. Uses mandatory ‘text’ property, string or null type Optional properties:

optional
font: int_of_font or Font.<fontname> property (). By default - default font, that was set in gui_scene.config
color: int or Color. By default - default font color, that was set in gui_scene.config
fontFx: one of FFT_ consts, by default FFT_NONE
fxColor: int or Color. By default - defFontFxColor, set in gui_scene.confg
fxFactor: numeric or null. Be default - 48.
fxOffsX: numeric or null, 0 by default
fxOffsY: numeric or null, 0 by default
overflowX: int or TOVERVLOW_ const, by TOVERFLOW_CLIP
ellipsis: boolean - add ellipsis symbol on overflow
spacing: numeric or null. Extra spacing bnetween charactes.
monoWidth: numeric. Use provided number as character width.
password: null, bool or string character. Replace text with provided character or with "*"
brightness: float from 0 to 1.
const ROBJ_TEXTAREA

Use the same properties as text plus:

overflowY: int or TOVERVLOW_ type (CLIP by default) ‘lowLineCountAlign’: PLACE_DEFAULT by default (where to vertical align text when it doesnt overflow)

const ROBJ_INSCRIPTION

Properties are the same as ROBJ_TEXT.

However, it renders as inscription, in separate texture, not each character by separate rectangle as ROBJ_TEXT does. It also would be different size with the same fontSize (this is known but undesirable behavior, to prevent clip of text. Should be fixed once). This requires more memory, but provides better fontFx results (shadows do not overlap other characters). It can be also faster perf-wise, but in very rare conditions.

const ROBJ_IMAGE
Properites:
image: Picture object
color: int or color, 0xFFFFFF by default
fallbackImage: Picture that will be used on loading error. As Picture is async image, that can be needed in some cases (http
images, user images, etc). Solid white by default keepAspect: bool or KEEP_ASPECT_FILL, KEEP_ASPECT_FIT, KEEP_ASPECT_NONE.
KEEP_ASPECT_NONE by default picSaturate: float from 0 to 1, 1 by default. imageHalign: ALIGN_CENTER by default. Can be also
ALIGN_RIGHT, ALIGN_LEFT imageValign: ALIGN_CENTER by default. Can be also ALIGN_TOP, ALIGN_BOTTOM flipX: bool flipY: bool
imageAffectsLayout: bool, false by default. Means that image should have SIZE.
brightness: float from 0 to 1
const ROBJ_VECTOR_CANVAS
optional
color: int or color, 0xFFFFFF by default
fillColor: int or color, 0xFFFFFF by default
lineWidth: float, 2 by default.
draw: function(api, rect) //see canvasAPI
commands: array of commands (each command is an array also, where first argument - command type, other are properties of that
          command). See list of VECTOR_ constants for commands list brightness: float from 0 to 1
const ROBJ_9RECT

Renders a nine-slice scalable image.

Properties:
image: Picture object (required)
color: int or Color (default: 0xFFFFFFFF)
brightness: float (default: 1.0, range: 0.0 to 1.0)
texOffs: array of 4 floats (texture offsets for slicing: top, right, bottom, left)
screenOffs: array of 4 floats (screen offsets corresponding to texOffs)
const ROBJ_PROGRESS_LINEAR

Renders a linear progress bar.

Properties:
fValue: float (progress value from -1.0 to 1.0)
bgColor: int or Color (default: 0x64646464)
fgColor: int or Color (default: 0xFFFFFFFF)
brightness: float (default: 1.0, range: 0.0 to 1.0)
const ROBJ_PROGRESS_CIRCULAR

Renders a circular progress bar.

Properties:
fValue: float (progress value from -1.0 to 1.0)
image: Picture object (optional)
fallbackImage: Picture object (optional, used if 'image' fails)
bgColor: int or Color (default: 0x64646464)
fgColor: int or Color (default: 0xFFFFFFFF)
brightness: float (default: 1.0, range: 0.0 to 1.0)
const ROBJ_BOX

Renders a filled rectangle (box) with optional image, border, and rounded corners. Properties:

borderWidth: float, or array of 4 floats [top, right, bottom, left] (default: [1,1,1,1]) borderRadius: float, or array of 4 floats [top-left, top-right, bottom-right, bottom-left] (default: [0,0,0,0]) borderColor: int or Color (default: none, optional) fillColor: int or Color (default: transparent, 0x00000000) image: Picture object (optional) fallbackImage: Picture object (optional, used if ‘image’ fails) keepAspect: KEEP_ASPECT_FILL, KEEP_ASPECT_FIT, KEEP_ASPECT_NONE (default: KEEP_ASPECT_NONE) imageHalign: ElemAlign (default: ALIGN_CENTER), image render imageValign: ElemAlign (default: ALIGN_CENTER), image render flipX: bool (default: false), image render flipY: bool (default: false), image render picSaturate (saturateFactor): float (default: 1.0), image render brightness: float (default: 1.0, range: 0.0 to 1.0), image render

const ROBJ_MOVIE

Renders a video playback object.

Note

requires behavior = Behaviors.Movie

Properties:
movie: string, path to video file
color: int or color, 0xFFFFFF by default
keepAspect: bool or KEEP_ASPECT_FILL, KEEP_ASPECT_FIT, KEEP_ASPECT_NONE. KEEP_ASPECT_NONE by default
saturateFactor: float from 0 to 1, 1 by default.
imageHalign: ALIGN_CENTER by default. Can be also ALIGN_RIGHT, ALIGN_LEFT
imageValign: ALIGN_CENTER by default. Can be also ALIGN_TOP, ALIGN_BOTTOM
loop: bool
const ROBJ_MASK

Renders a clipping mask to constrain rendering of child elements. Properties:

mask: Picture object (required)

const ROBJ_DAS_CANVAS

Renders a custom drawing canvas using daslang. Two magnitudes faster (>100x).

class LottieAnimation extends Picture

LottieAnimation(arg0)
Arguments:
  • arg0 (null or string()) – autodoc from typemask/paramscheck

typecheck mask: any_type, null or string

const ROBJ_WORLD_BLUR

Render object that blurs ‘world’ and use it as image of render object Uses ‘color’ property, that change color of blurred scene Uses ‘fillColor’ property, that added as color above blurred scene

const ROBJ_WORLD_BLUR_PANEL

Render object that blurs ‘world’ and ui and use it as image of render object Uses ‘color’ property, that change color of blurred scene Uses ‘fillColor’ property, that added as color above blurred scene