Browse Source

An neues Framework angepasst

Kolja Strohm 5 years ago
parent
commit
e478b34e2d

+ 1 - 1
ksgScript/Befehl/KSGSKlasse.cpp

@@ -203,7 +203,7 @@ MausEreignis KSGSKlasseInstanz::getMausEreignis() const
 			tmp->release();
 			return ret;
 		}
-		return MausEreignis{ 0, 0, 0, 0, 1 };
+		return MausEreignis{ 0, 0, 0, 0, 1, 0, 0 };
 	}
 }
 

+ 1 - 1
ksgScript/Klassen/KSGSBildZ.cpp

@@ -89,7 +89,7 @@ KSGSVariable *KSGSBildZKlasse::startFunktion( int id, bool access, RCArray< KSGS
         {
             if( parameter->getEintragAnzahl() < 1 )
                 error( 20, {}, obj );
-            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1 };
+            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1, 0, 0 };
             val->doPublicMausEreignis( me );
         }
         break;

+ 1 - 1
ksgScript/Klassen/KSGSFenster.cpp

@@ -265,7 +265,7 @@ KSGSVariable *KSGSFensterKlasse::startFunktion( int id, bool access, RCArray< KS
         {
             if( parameter->getEintragAnzahl() < 1 )
                 error( 20, {}, obj );
-            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1 };
+            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1, 0, 0 };
             val->doPublicMausEreignis( me );
         }
         break;

+ 1 - 1
ksgScript/Klassen/KSGSKnopf.cpp

@@ -141,7 +141,7 @@ KSGSVariable *KSGSKnopfKlasse::startFunktion( int id, bool access, RCArray< KSGS
         {
             if( parameter->getEintragAnzahl() < 1 )
                 error( 20, {}, obj );
-            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1 };
+            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1, 0, 0 };
             val->doPublicMausEreignis( me );
         }
         break;

+ 6 - 0
ksgScript/Klassen/KSGSMausEreignis.cpp

@@ -109,6 +109,12 @@ KSGSVariable *KSGSMausEreignisKlasse::getVariable( int id, bool zugriff ) const
     case 4: // bool insideParent
         ret = new KSGSBoolKlasse( obj, val.insideParent );
         break;
+    case 5: // int originalX
+        ret = new KSGSIntKlasse( obj, val.originalX );
+        break;
+    case 6: // int originalY
+        ret = new KSGSIntKlasse( obj, val.originalY );
+        break;
 	}
 	if( !ret )
 		error( 17, {}, obj );

+ 1 - 1
ksgScript/Klassen/KSGSMausEreignis.h

@@ -13,7 +13,7 @@ namespace KSGScript
 
 	public:
 		// Konstruktor
-		__declspec( dllexport ) KSGSMausEreignisKlasse( KSGScriptObj *zObj, MausEreignis std = { 0, 0, 0, 0, 1 } );
+		__declspec( dllexport ) KSGSMausEreignisKlasse( KSGScriptObj *zObj, MausEreignis std = { 0, 0, 0, 0, 1, 0, 0 } );
 		// Destruktor
 		__declspec( dllexport ) ~KSGSMausEreignisKlasse();
 		// nicht constant

+ 1 - 1
ksgScript/Klassen/KSGSTextFeld.cpp

@@ -180,7 +180,7 @@ KSGSVariable *KSGSTextFeldKlasse::startFunktion( int id, bool access, RCArray< K
         {
             if( parameter->getEintragAnzahl() < 1 )
                 error( 20, {}, obj );
-            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1 };
+            MausEreignis me = parameter->z( 0 ) ? parameter->z( 0 )->getMausEreignis() : MausEreignis{ 0, 0, 0, 0, 1, 0, 0 };
             val->doPublicMausEreignis( me );
         }
         break;

+ 2 - 0
ksgScript/Leser/KSGSCompile.cpp

@@ -256,6 +256,8 @@ KSGSCompKlassTable::KSGSCompKlassTable()
 	_MausEreignis->vars.addVariable( "my", new KSGSCompileVariable( KSGS_INT, 1 ) );
 	_MausEreignis->vars.addVariable( "verarbeitet", new KSGSCompileVariable( KSGS_BOOL, 1 ) );
     _MausEreignis->vars.addVariable( "insideParent", new KSGSCompileVariable( KSGS_BOOL, 1 ) );
+    _MausEreignis->vars.addVariable( "originalX", new KSGSCompileVariable( KSGS_INT, 1 ) );
+    _MausEreignis->vars.addVariable( "originalY", new KSGSCompileVariable( KSGS_INT, 1 ) );
 	_MausEreignis->funcs.addFunktion( "setId", new KSGSCompileFunktion( KSGS_VOID, 1, { KSGS_INT } ) );
 	_MausEreignis->funcs.addFunktion( "setMx", new KSGSCompileFunktion( KSGS_VOID, 1, { KSGS_INT } ) );
 	_MausEreignis->funcs.addFunktion( "setMy", new KSGSCompileFunktion( KSGS_VOID, 1, { KSGS_INT } ) );