changed version to 1.0.3
[livewp] / applet / src / livewp-multiactor.c
index a282a1f..aa1e8a4 100644 (file)
@@ -7,8 +7,8 @@
  *       for the code
  * 
  * This software is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of
  * the License, or (at your option) any later version.
  * 
  * This software is distributed in the hope that it will be useful, but
@@ -65,3 +65,18 @@ void multiactor_set_scale(MultiActor *ma, double scale)
     }
     ma->scale = scale;
 }
+void multiactor_set_position(MultiActor *ma, gint dx, gint dy, gint dz)
+{
+    GSList *tmp = ma->child;
+    gint x, y, z;
+    while (tmp != NULL){
+        x = g_object_get_data(G_OBJECT(tmp->data), "x");
+        y = g_object_get_data(G_OBJECT(tmp->data), "y");
+        z = g_object_get_data(G_OBJECT(tmp->data), "z");
+        actor_set_position_full(tmp->data, x + dx, y + dy, z + dz);        
+        tmp = g_slist_next(tmp);
+    }
+    ma->x = dx;
+    ma->y = dy;
+    ma->z = dz;
+}