OSD

ShowMessage(Message string,COLORREF_color number,add_time number,append number)

Description
Show string on OSD.
Parameters
Message -  message string
COLORREF_color - color of message
add_time  - add time in sec
append  - if not 0 then append to current message

ShowMessage_UTF8(Message string_utf8,COLORREF_color number,add_time number,append number)

Description
utf8 version of ShowMessage

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

SimpleTV ver
SimpleTV v.0.4.7 r4 (556) or above
Description
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].Adress - 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].Adress = '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].Adress = '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)

Зашли как: Anonymous (Anonymous)
mantis/simpletv/api/osd.txt · Последние изменения: 28/09/2016 17:00 — SergeyVS
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki