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

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

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


mantis:simpletv:api:osd

OSD

ShowMessageT(param)

param - table
param.text - utf8 string
param.id - string (by default «luaOsdMessage»)
param.color - color in ARGB (optional)
param.showTime - add time (by default 0)
param.append - boolean (by default false)

ShowSelect(Head,DefaultID,Content,TimeOut,Flags,LuaScript)

Creates a select menu on the OSD.

Parameters
Head      - menu title (type: string (ANSI))
DefaultID - ID of the item selected by default (type: number)
Content   - menu items (type: table)
            Content[ID] = {}
            Content[ID].Id   - ID of item (type: number)
            Content[ID].Name - Name of item (type: string (ANSI))
            Content[ID].Address - Address of item (type: string (ANSI))
            Content[ID].InfoPanelLogo - Address of pictures used as Logo of item in InfoPanel(optional field, type: string (ANSI)
            Content[ID].InfoPanelDesk - Description of item in InfoPanel (optional field, type: string (ANSI))
TimeOut   - Time after which the menu will be closed if user inactive. (type: number, 0 - disable autoclose)
Flags     - Settings of SelectMenu (type: number). The sum of the flags: MODAL_MODE=1 - modal mode of MenuSelect
                                                                         STOP_LOAD_ANIMATION=2 - hide wait cursor
                                                                         NO_GLOBAL_ADDRESS_INFO=4
                                                                         ALLOW_OK_ON_CURRENT_ITEM=8 - allows to click 'OK' on default Item
                                                                         ALWAYS_OK=16 - Pressed 'ok' if pressed ESC or timeout
                                                                         NOT_SHOW=32  - Not show select window  (only when MODAL_MODE==0 and NO_GLOBAL_ADDRESS_INFO==0)
                                                                         NOT_CHANGE_MAIN_TITLE=64 - Not show row name in main title(control panel and etc)(since version 0.4.8 b9)
                                                                         IS_ONE_ITEM=128 - no auto next play (All items is one stream(maybe different resolution etc) (since version 0.4.8 b9)
LuaScript - name of file LuaScript (type: string (ANSI))
Return Value
select_error - returns the result of a user action (type: number): nil - error, 0 - Escape (Pressed 'ESC' or timer), 1 - pressed 'OK'
ID           - ID of selected item
Sample
local content = {}
local i = 1
content[i] = {}
content[i].Id = i
Content[i].Name = 'Film'
Content[i].Address = 'http://test.net/film.avi'
Content[i].InfoPanelLogo = 'http://test.net/film.png'
Content[i].InfoPanelDesk = 'Best film of the world'
....
i = i+1
content[i] = {}
content[i].Id = i
Content[i].Name = 'Film 2'
Content[i].Address = 'http://test.net/film2.avi'
Content[i].InfoPanelLogo = 'http://test.net/film2.png'
Content[i].InfoPanelDesk = 'I do not know what kind of film' 

local select_error,ID = m_simpleTV.OSD.ShowSelect('My best film collection',1,content,5000,2+4+8)
Additional button

ShowSelect_UTF8(Head,DefaultID,Content,TimeOut,Flags,LuaScript)

utf8 version of ShowSelect

id = AddEventListener(t)

example
function testcallback(typeEvent)
end
t ={}
t.type = 1 --
t.callback = 'testcallback'
id = m_simpleTV.OSD.AddEventListener(t)

type - битовая маска
1 - OSD_STATE_CHANGED (создание, normal/fullscreen mode, изменение шрифта и тп)

RemoveEventListener(id)

AddElement

RemoveElement

ControlElement

SetElementDebugMode

PlayInSinglePiP

ShowMessageBox

deprecated from 0.5

  • ShowMessage(Message string,COLORREF_color number,add_time number,append number)
  • ShowMessage_UTF8(Message string_utf8,COLORREF_color number,add_time number,append number)
mantis/simpletv/api/osd.txt · Последние изменения: 2020/01/30 12:35 — SergeyVS