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

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

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


mantis:simpletv:api:interface

Interface

Adds a item in the "Extra" menu and assign hotkeys to run the script
Parameters
t.utf8 (true) -  string coding
t.codepage (0) - code page of non utf8 text
t.name - Name of item in the "Extra" menu if name=='-' then add separator
t.luastring - lua file name or script 
t.lua_as_scr (false)  - if true then t.luastring is script, overwise t.luastring is file name of lua script
t.submenu ('') - string, name of submenu
t.imageSubmenu  ('') - string, image of submenu
t.key (0) - letter hotkey (type: byte (ANSI char))
t.ctrlkey (0) - modifier keys (type: number) (available value: 0 - not modifier keys, 1 - CTRL, 2 - SHIFT, 3 - CTRL + SHIFT )  
t.location (0) - 0 - in main menu,1 - in playlist menu, -1 all
t.image(t) - string, image file name 
Return Value
id - numeric identifier of the menu item (type: number)   

RemoveExtMenu(menuId)

a,b = GetLanguage()

Getting the language of OS and SimpleTV
a - SimpleTV language  (ru, en, etc) (type: ANSI string)
b - OS language (type: ANSI string)

number = MessageBox(Messsage string_UTF8,Caption string_UTF8,Type number,Object(opt))

Show MessageBox
Parameters
Messsage - message string
Caption  - window caption
Type     - type of message box
Object   - parent window (object, nil or none - current foreground window, 0 - main window), from v 0.4.8 b8
Return Value
MessageBox return value or nil on error

number = GetSysColor(Index number)

Return Value
ARGB value of the given element.

SetFullScreenMode(number (-1 - toggle 0-unset 1-set))

boolean = GetFullScreenMode()

SetRatioMainFrame(number)

Sample
m_simpleTV.Interface.SetRatioMainFrame(9/16)

x,y = GetCursorPosition()

x,y,cx,cy = GetScreenRect(x,y)

number = GetScale()

DEPRECTATED

AddExtMenu(NameString,LuaName,letter,mod_keys,location(opt),code_page(opt),submenu(opt) string,image(opt) string) 
AddExtMenu_UTF8(NameString string_utf8,LuaName string_utf8,letter(opt),mod_keys(opt),location(opt),nil,submenu(opt) string_utf8,image(opt) string_utf8)
mantis/simpletv/api/interface.txt · Последние изменения: 2020/04/26 20:04 — SergeyVS