mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-14 17:03:40 +02:00
CLuaInstance: Add script function 'enableInfoClock'
- Set Lua api version to 1.8
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <gui/widget/keyboard_input.h>
|
||||
#include <gui/filebrowser.h>
|
||||
#include <gui/movieplayer.h>
|
||||
#include <gui/infoclock.h>
|
||||
#include <driver/pictureviewer/pictureviewer.h>
|
||||
#include <neutrino.h>
|
||||
#include <zapit/types.h>
|
||||
@@ -533,6 +534,7 @@ const luaL_Reg CLuaInstance::methods[] =
|
||||
{ "strSub", CLuaInstance::strSub },
|
||||
{ "checkVersion", CLuaInstance::checkVersion },
|
||||
{ "createChannelIDfromUrl", CLuaInstance::createChannelIDfromUrl },
|
||||
{ "enableInfoClock", CLuaInstance::enableInfoClock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -2747,3 +2749,15 @@ int CLuaInstance::createChannelIDfromUrl(lua_State *L)
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
int CLuaInstance::enableInfoClock(lua_State *L)
|
||||
{
|
||||
bool enable = true;
|
||||
int numargs = lua_gettop(L);
|
||||
if (numargs > 1)
|
||||
enable = _luaL_checkbool(L, 2);
|
||||
CInfoClock::getInstance()->enableInfoClock(enable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user