EgtExecutor 1.8b4 :

- aggiunta a Exe e Lua funzione GetImage.
This commit is contained in:
Dario Sassi
2017-02-13 08:21:21 +00:00
parent 85e912ceb1
commit 63faefebea
3 changed files with 40 additions and 3 deletions
+26
View File
@@ -189,6 +189,31 @@ LuaSetViewCenter( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetImage( lua_State* L)
{
// 6 argomenti : nShowMode, colBackTop, colBackBottom, nWidth, nHeight, sFile
int nShowMode ;
LuaCheckParam( L, 1, nShowMode)
Color colBackTop ;
LuaCheckParam( L, 2, colBackTop)
Color colBackBottom ;
LuaCheckParam( L, 3, colBackBottom)
int nWidth ;
LuaCheckParam( L, 4, nWidth)
int nHeight ;
LuaCheckParam( L, 5, nHeight)
string sFile ;
LuaCheckParam( L, 6, sFile)
LuaClearStack( L) ;
// creo e salvo una immagine della scena
bool bOk = ExeGetImage( nShowMode, colBackTop, colBackBottom, nWidth, nHeight, sFile) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallScene( LuaMgr& luaMgr)
@@ -204,5 +229,6 @@ LuaInstallScene( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSetView", LuaSetView) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetGenericView", LuaSetGenericView) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetViewCenter", LuaSetViewCenter) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetImage", LuaGetImage) ;
return bOk ;
}