EgtInterface 1.5l2 :
- migliorie e modifiche in generale, specie su Lua.
This commit is contained in:
+10
-28
@@ -33,25 +33,7 @@ LuaChangeVectorBase( lua_State* L)
|
||||
LuaCheckParam( L, 2, ptBase)
|
||||
LuaClearStack( L) ;
|
||||
// modifica del testo
|
||||
bool bOk = ( EgtChangeVectorBase( nId, ptBase.v) ? true : false) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaOffsetCurve( lua_State* L)
|
||||
{
|
||||
// 4 parametri : Id, dDist, nType
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
double dDist ;
|
||||
LuaCheckParam( L, 2, dDist)
|
||||
int nType ;
|
||||
LuaCheckParam( L, 3, nType)
|
||||
LuaClearStack( L) ;
|
||||
// offset della curva
|
||||
bool bOk = ( EgtOffsetCurve( nId, dDist, nType) ? true : false) ;
|
||||
bool bOk = ( EgtChangeVectorBase( nId, ptBase.v) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -67,7 +49,7 @@ LuaModifyText( lua_State* L)
|
||||
LuaCheckParam( L, 2, sNewText)
|
||||
LuaClearStack( L) ;
|
||||
// modifica del testo
|
||||
bool bOk = ( EgtModifyText( nId, sNewText) ? true : false) ;
|
||||
bool bOk = ( EgtModifyText( nId, sNewText) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -83,7 +65,7 @@ LuaChangeTextFont( lua_State* L)
|
||||
LuaCheckParam( L, 2, sNewFont)
|
||||
LuaClearStack( L) ;
|
||||
// modifica del testo
|
||||
bool bOk = ( EgtChangeTextFont( nId, sNewFont) ? true : false) ;
|
||||
bool bOk = ( EgtChangeTextFont( nId, sNewFont) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -97,7 +79,7 @@ LuaFlipText( lua_State* L)
|
||||
LuaCheckParam( L, 1, nId)
|
||||
LuaClearStack( L) ;
|
||||
// flip del testo
|
||||
bool bOk = ( EgtFlipText( nId) ? true : false) ;
|
||||
bool bOk = ( EgtFlipText( nId) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -110,15 +92,16 @@ LuaMirrorText( lua_State* L)
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
bool bOnL = true ;
|
||||
string sLorH ;
|
||||
if ( LuaGetParam( L, 2, sLorH)) {
|
||||
if ( lua_gettop( L) >= 2) {
|
||||
string sLorH ;
|
||||
LuaCheckParam( L, 2, sLorH) ;
|
||||
ToUpper( sLorH) ;
|
||||
if ( sLorH == "H")
|
||||
bOnL = false ;
|
||||
}
|
||||
LuaClearStack( L) ;
|
||||
// flip del testo
|
||||
bool bOk = ( EgtMirrorText( nId, bOnL) ? true : false) ;
|
||||
bool bOk = ( EgtMirrorText( nId, bOnL) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -134,7 +117,7 @@ LuaTextToOutline( lua_State* L)
|
||||
LuaCheckParam( L, 2, nIdGroupDest)
|
||||
LuaClearStack( L) ;
|
||||
// esplosione del testo in outline
|
||||
bool bOk = ( EgtTextToOutline( nId, nIdGroupDest) ? true : false) ;
|
||||
bool bOk = ( EgtTextToOutline( nId, nIdGroupDest) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -150,7 +133,7 @@ LuaSplitText( lua_State* L)
|
||||
LuaCheckParam( L, 2, nIdGroupDest)
|
||||
LuaClearStack( L) ;
|
||||
// esplosione del testo in più testi, uno per riga
|
||||
bool bOk = ( EgtSplitText( nId, nIdGroupDest) ? true : false) ;
|
||||
bool bOk = ( EgtSplitText( nId, nIdGroupDest) != FALSE) ;
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -162,7 +145,6 @@ LuaInstallGdbModify( lua_State* L)
|
||||
{
|
||||
try {
|
||||
lua_register( L, "EgtChangeVectorBase", LuaChangeVectorBase) ;
|
||||
lua_register( L, "EgtOffsetCurve", LuaOffsetCurve) ;
|
||||
lua_register( L, "EgtModifyText", LuaModifyText) ;
|
||||
lua_register( L, "EgtChangeTextFont", LuaChangeTextFont) ;
|
||||
lua_register( L, "EgtFlipText", LuaFlipText) ;
|
||||
|
||||
Reference in New Issue
Block a user