Инструменты пользователя

  • Зашли как Anonymous (Anonymous)
  • Выйти

Инструменты сайта


mantis:simpletv:api:dialog

Dialog

Example of dialog lua script
   function OnNavigateComplete(Object) --called when dialog ready
   end
   function ОnОк(Object)  
   end     
All functions that are called from the SimpleTV core, must be defined in the dialog script.

Object = ShowT(table)

local t ={}
t.name     -optional
t.urlHtml
t.urlLua
t.id       -optional
t.urlLogo  -optional
t.x        -optional
t.y        -optional
t.cx       -optional
t.cy       -optional
t.minCx    -optional
t.minCy    -optional
t.maxCx    -optional
t.maxCy    -optional
t.childPositionParams -optional, 'typeAlign="0x202" x="0" y="0" cx="-50" cy="-30" xb="0" yb="0" mincx="0" mincy="0"'  
           for dialog embedded in mainframe
t.flags
        HAVE_SIZE=1,
        NO_CLOSE=2,
        ALLOW_RESIZE=4,
        NO_CHANGE_CONTEXT_MENU=8,
        OPT_HIDE_WINDOW=64,         //not visible window
        OPT_SILENT_MODE=128,        //disable JS error messages
        NOT_MODAL=512,
        NOT_TOP_ON_MAINFRAME=1024,  //only if not modal
        FRAMELESS_MODE=4096,
        TRANSPARENT_BACKGROUND=8192,
        INHERIT_OSD_FONT=16384
        SHOW_WITHOUT_ACTIVATING=32768
  
t.parent   -optional(Object)
t.watchForMouse -optional(boolean)
t.closeOnHide   -optional(boolean)
t.watchX   -optional(number)
t.watchY   -optional(number)
t.watchCX  -optional(number)
t.watchCY  -optional(number)
t.userValue -optional
t.roundCorner  -optional(number), only when frameless
  

SetOnCloseEvent(Object,functionName string)

SetWindowPos(Object,x,y,cx,cy)

x,y,cx,cy = GetWindowPos(Object)

RedrawWindow(Object)

ShowWindow(Object,Show boolean,WithAnimation boolean(false))

boolean = IsWindowVisible(Object)

SetWindowId(Object,Id string)

Id = GetWindowId(Object)

Object = FindWindowById(Id)

SetForegroundWindow(Object)

SetWindowName(Object,Name utf8 string)

SetWindowIcon(Object,IconPath utf string)

ExecScript(Object,jsScript - utf8 string)

val = ExecScriptParam(Object,jsScript - utf8 string)

SetMinSize(Object,cx,cy)

SetMaxSize(Object,cx,cy)

Close(Object)

str = getCookies(Object)

SetUserValue(Object,value)

value = GetUserValue((Object)

mantis/simpletv/api/dialog.txt · Последние изменения: 2020/04/26 17:25 — SergeyVS