EgtExecutor :
- aggiunta funzione Exe e Lua GetBackground per colori top e bottom dello sfondo della scena.
This commit is contained in:
@@ -86,6 +86,17 @@ ExeSetBackground( Color TopCol, Color BottomCol, bool bRedraw)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetBackground( Color& TopCol, Color& BottomCol)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, false)
|
||||
// recupero lo sfondo
|
||||
pScene->GetBackground( TopCol, BottomCol) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetMarkAttribs( Color MarkCol)
|
||||
|
||||
@@ -38,6 +38,28 @@ LuaSetBackground( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetBackground( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// recupero lo sfondo
|
||||
Color colTop ;
|
||||
Color colBot ;
|
||||
bool bOk = ExeGetBackground( colTop, colBot) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, colTop) ;
|
||||
LuaSetParam( L, colBot) ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
LuaSetParam( L) ;
|
||||
}
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaDraw( lua_State* L)
|
||||
@@ -237,6 +259,7 @@ LuaInstallScene( LuaMgr& luaMgr)
|
||||
{
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetBackground", LuaSetBackground) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetBackground", LuaGetBackground) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDraw", LuaDraw) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetShowMode", LuaSetShowMode) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetShowCurveDirection", LuaSetShowCurveDirection) ;
|
||||
|
||||
Reference in New Issue
Block a user