Index: /orxonox/branches/physics/src/subprojects/particles/Makefile.am
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/Makefile.am	(revision 4332)
+++ /orxonox/branches/physics/src/subprojects/particles/Makefile.am	(revision 4333)
@@ -39,4 +39,5 @@
 
 particles_SOURCES= framework.cc \
+		   particle_fun.cc \
 		  $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \
 		  $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \
Index: /orxonox/branches/physics/src/subprojects/particles/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/Makefile.in	(revision 4332)
+++ /orxonox/branches/physics/src/subprojects/particles/Makefile.in	(revision 4333)
@@ -54,4 +54,5 @@
 PROGRAMS = $(bin_PROGRAMS)
 am_particles_OBJECTS = particles-framework.$(OBJEXT) \
+	particles-particle_fun.$(OBJEXT) \
 	particles-particle_engine.$(OBJEXT) \
 	particles-particle_system.$(OBJEXT) \
@@ -87,4 +88,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/particles-particle_emitter.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/particles-particle_engine.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/particles-particle_fun.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/particles-particle_system.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/particles-primitive_model.Po \
@@ -221,4 +223,5 @@
 particles_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
 particles_SOURCES = framework.cc \
+		   particle_fun.cc \
 		  $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \
 		  $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \
@@ -323,4 +326,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-particle_emitter.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-particle_engine.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-particle_fun.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-particle_system.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-primitive_model.Po@am__quote@
@@ -362,4 +366,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-framework.obj `if test -f 'framework.cc'; then $(CYGPATH_W) 'framework.cc'; else $(CYGPATH_W) '$(srcdir)/framework.cc'; fi`
+
+particles-particle_fun.o: particle_fun.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particles-particle_fun.o -MD -MP -MF "$(DEPDIR)/particles-particle_fun.Tpo" -c -o particles-particle_fun.o `test -f 'particle_fun.cc' || echo '$(srcdir)/'`particle_fun.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particles-particle_fun.Tpo" "$(DEPDIR)/particles-particle_fun.Po"; else rm -f "$(DEPDIR)/particles-particle_fun.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='particle_fun.cc' object='particles-particle_fun.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particles-particle_fun.Po' tmpdepfile='$(DEPDIR)/particles-particle_fun.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-particle_fun.o `test -f 'particle_fun.cc' || echo '$(srcdir)/'`particle_fun.cc
+
+particles-particle_fun.obj: particle_fun.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particles-particle_fun.obj -MD -MP -MF "$(DEPDIR)/particles-particle_fun.Tpo" -c -o particles-particle_fun.obj `if test -f 'particle_fun.cc'; then $(CYGPATH_W) 'particle_fun.cc'; else $(CYGPATH_W) '$(srcdir)/particle_fun.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particles-particle_fun.Tpo" "$(DEPDIR)/particles-particle_fun.Po"; else rm -f "$(DEPDIR)/particles-particle_fun.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='particle_fun.cc' object='particles-particle_fun.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particles-particle_fun.Po' tmpdepfile='$(DEPDIR)/particles-particle_fun.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-particle_fun.obj `if test -f 'particle_fun.cc'; then $(CYGPATH_W) 'particle_fun.cc'; else $(CYGPATH_W) '$(srcdir)/particle_fun.cc'; fi`
 
 particles-particle_engine.o: $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc
Index: /orxonox/branches/physics/src/subprojects/particles/framework.cc
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4332)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4333)
@@ -16,8 +16,5 @@
 #include "framework.h"
 
-#include "physics_engine.h"
-#include "particle_engine.h"
-
-#include "gui_gtk.h"
+
 #include "p_node.h"
 #include "null_parent.h"
@@ -32,18 +29,4 @@
 int verbose;
 
-int quitGui(GtkWidget* widget, void* data);
-
-
-void Framework::initModule()
-{
-  // Creating a Test Particle System
-  ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
-
-  // Creating a Test Particle Emitter
-  ParticleEmitter* emitter = new ParticleEmitter(Vector(0 , 1, 0));
-  // Add the Flow from the Emitter into the System
-  ParticleEngine::getInstance()->addConnection(emitter, system);
-}
-
 void* Framework::mainLoop(void* tmp)
 {
@@ -60,4 +43,6 @@
       float dt = framework->tick();
 
+      NullParent::getInstance()->update(dt);
+
       // Draw the scene
       framework->draw(dt);
@@ -71,6 +56,6 @@
   glLoadIdentity(); // Reset the view
   
-  ParticleEngine::getInstance()->draw(dt);
-
+  this->moduleDraw(dt);
+  
   camera->apply();
   
@@ -85,7 +70,6 @@
   lastFrame = currFrame;
 
-  ParticleEngine::getInstance()->tick(dt);
-
-  NullParent::getInstance()->update(dt);
+  this->moduleTick(dt);
+
   return dt;
 }
@@ -161,5 +145,5 @@
 	    break;
 	  case SDLK_i:
-	    ParticleEngine::getInstance()->debug();
+	    //	    ParticleEngine::getInstance()->debug();
 	    break;
 	  case SDLK_a:
@@ -231,5 +215,5 @@
  
 
-  initModule();
+  moduleInit();
 
   camera = new Camera();
@@ -238,5 +222,4 @@
 
   camera->setAbsCoor(Vector(10, 10, 0));
-
 }
 
@@ -254,110 +237,8 @@
   PRINT(0)("========================\n");
   PRINT(0)("h - print thisHelp\n");
-  PRINT(0)("i - state Information\n\n");
-  PRINT(0)("\n");
-
-
-}
-
-int emitterChange(GtkWidget* nonInterest, void* widget)
-{
-  Option* option = (Option*) widget;
-  const char* name = option->getTitle();
-  char* valueC = option->save();
-  float value = atof(valueC);
-
-  ParticleEmitter* tmpEmit = ParticleEngine::getInstance()->getEmitterByNumber(1);
-  if (tmpEmit)
-    {
-      if (!strcmp(name, "EmissionRate"))
-	{
-	  tmpEmit->setEmissionRate(value);
-	  PRINT(3)("EmissionRate set to %f\n", value);
-	}
-      else if (!strcmp(name, "Velocity"))
-	{
-	  tmpEmit->setEmissionVelocity(value);
-	  PRINT(3)("Velocity set to %f\n", value);
-	}
-      else if(!strcmp(name, "SpreadAngle"))
-	{
-	  tmpEmit->setSpread(value);
-	  PRINT(3)("SpreadAngle set to %f\n", value);
-	}
-      else if(!strcmp(name, "EmitterType"))
-	{
-	  if (!strcmp(valueC, "EMITTER_DOT"))
-	    tmpEmit->setType(EMITTER_DOT);
-	  else if (!strcmp(valueC, "EMITTER_PLANE"))
-	    tmpEmit->setType(EMITTER_PLANE);
-	  else if (!strcmp(valueC, "EMITTER_CUBE"))
-	    tmpEmit->setType(EMITTER_CUBE);
-	  PRINT(3)("EmitterType set to %s\n", valueC);	  
-	}
-      else if(!strcmp(name, "EmitterSize"))
-	{
-	  tmpEmit->setSize(value);
-	  PRINT(3)("EmitterSize set to %f\n", value);
-	}
-    }
-  delete valueC;
-}
-
-
-int systemChange(GtkWidget* nonInterest, void* widget)
-{
-  Option* option = (Option*) widget;
-  const char* name = option->getTitle();
-  char* valueC = option->save();
-  float value = atof(valueC);
-
-  ParticleSystem* tmpSys = ParticleEngine::getInstance()->getSystemByNumber(1);
-  if (tmpSys)
-    {
-      if (!strcmp(name, "StartRadius"))
-	{
-	  tmpSys->setRadius(value, tmpSys->getEndRadius());
-	  PRINT(3)("ParticleStartRadius set to %f\n", value);
-	}
-      else if (!strcmp(name, "EndRadius"))
-	{
-	  tmpSys->setRadius( tmpSys->getStartRadius(), value);
-	  PRINT(3)("ParticleEndRadius set to %f\n", value);
-	}
-
-      else if (!strcmp(name, "LifeSpan"))
-	{
-	  tmpSys->setLifeSpan(value);
-	  PRINT(3)("ParticleLifeSpan set to %f\n", value);
-	}
-
-      else if (!strcmp(name, "ConserveFactor"))
-	{
-	  tmpSys->setConserve(value);
-	  PRINT(3)("ParticleConserveFactor set to %f\n", value);
-	}
-
-      else if (!strcmp(name, "ParticleType"))
-	{
-	  if (!strcmp(valueC, "PARTICLE_DOT"))
-	    tmpSys->setType(PARTICLE_DOT);
-	  else if (!strcmp(valueC, "PARTICLE_SPARK"))
-	    tmpSys->setType(PARTICLE_SPARK);
-	  else if (!strcmp(valueC, "PARTICLE_SPRITE"))
-	    tmpSys->setType(PARTICLE_SPRITE);
-
-	  PRINT(3)("ParticleType set to %s\n", valueC);
-	}
-
-      else if (!strcmp(name, "InheritSpeed"))
-	{
-	  tmpSys->setInheritSpeed(value);
-	  PRINT(3)("ParticleInheritSpeed set to %f\n", value);
-	}
-
-    }
-  delete valueC;
-}
-
+
+  this->moduleHelp();
+
+}
 
 int quitGui(GtkWidget* widget, void* data)
@@ -370,121 +251,4 @@
 }
 
-void* Framework::initGui(void* argv)
-{
-  Window* guiMainWindow = NULL;
-  
-  initGUI(0, NULL);
-  
-  guiMainWindow = new Window("ParticlesFUN");
-  {
-    Box* windowBox = new Box('v');
-    {
-      Frame* emitterFrame = new Frame("emitter-settings");
-      {
-	Box* emitterBox = new Box('v');
-	{
-	  emitterBox->fill(new Label("EmissionRate"));
-	  Slider* EmissionRate = new Slider("EmissionRate", 0, 1000);
-	  EmissionRate->connectSignal("value_changed", (void*)EmissionRate, emitterChange );
-	  emitterBox->fill(EmissionRate);
-	  
-	  emitterBox->fill(new Label("Velocity"));
-	  Slider* velocity = new Slider("Velocity", 0, 2);
-	  velocity->setExactness(3);
-	  velocity->connectSignal("value_changed", (void*)velocity, emitterChange );
-	  emitterBox->fill(velocity);
-	  
-	  emitterBox->fill(new Label("SpreadAngle"));
-	  Slider* SpreadAngle = new Slider("SpreadAngle", 0, M_PI);
-	  SpreadAngle->setExactness(3);
-	  SpreadAngle->connectSignal("value_changed", (void*)SpreadAngle, emitterChange );
-	  emitterBox->fill(SpreadAngle);
-
-	  emitterBox->fill(new Label("EmitterType"));
-	  Menu* EmitterType = new Menu("EmitterType");
-	  EmitterType->addItem("EMITTER_DOT");
-	  EmitterType->addItem("EMITTER_PLANE");
-	  EmitterType->addItem("EMITTER_CUBE");
-	  EmitterType->connectSignal("changed", (void*)EmitterType, emitterChange );	  
-	  emitterBox->fill(EmitterType);
-
-	  emitterBox->fill(new Label("EmitterSize"));
-	  Slider* EmitterSize = new Slider("EmitterSize", 0, 100);
-	  EmitterSize->setExactness(1);
-	  EmitterSize->connectSignal("value_changed", (void*)EmitterSize, emitterChange );
-	  emitterBox->fill(EmitterSize);
-	}
-	emitterFrame->fill(emitterBox);
-      }
-      windowBox->fill(emitterFrame);
-      
-      Frame* systemFrame = new Frame("system-settings");
-      {
-	Box* systemBox = new Box('v');
-	{
-	  systemBox->fill(new Label("StartRadius"));
-	  Slider* StartRadius = new Slider("StartRadius", 0, 10);
-	  StartRadius->setExactness(3);
-	  StartRadius->connectSignal("value_changed", (void*)StartRadius, systemChange );
-	  systemBox->fill(StartRadius);
-
-	  systemBox->fill(new Label("EndRadius"));
-	  Slider* EndRadius = new Slider("EndRadius", 0, 10);
-	  EndRadius->setExactness(3);
-	  EndRadius->connectSignal("value_changed", (void*)EndRadius, systemChange );
-	  systemBox->fill(EndRadius);
-
-	  systemBox->fill(new Label("LifeSpan"));
-	  Slider* LifeSpan = new Slider("LifeSpan", 0, 10);
-	  LifeSpan->setExactness(3);
-	  LifeSpan->connectSignal("value_changed", (void*)LifeSpan, systemChange );
-	  systemBox->fill(LifeSpan);
-	  
-	  systemBox->fill(new Label("ConserveFactor"));
-	  Slider* ConserveFactor = new Slider("ConserveFactor", 0, 1);
-	  ConserveFactor->setExactness(3);
-	  ConserveFactor->connectSignal("value_changed", (void*)ConserveFactor, systemChange );
-	  systemBox->fill(ConserveFactor);
-
-	  systemBox->fill(new Label("ParticleType"));
-	  Menu* ParticleType = new Menu("ParticleType");
-	  ParticleType->addItem("PARTICLE_DOT");
-	  ParticleType->addItem("PARTICLE_SPARK");
-	  ParticleType->addItem("PARTICLE_SPRITE");
-	  ParticleType->connectSignal("changed", (void*)ParticleType, systemChange );	  
-	  systemBox->fill(ParticleType);
-	  
-	  systemBox->fill(new Label("InheritSpeed"));
-	  Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1);
-	  InheritSpeed->setExactness(3);
-	  InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, systemChange );
-	  systemBox->fill(InheritSpeed);
-
-
-	}
-	systemFrame->fill(systemBox);
-      }
-      windowBox->fill(systemFrame);
-      
-      Button* quitButton = new Button("quit");
-      
-      quitButton->connectSignal("clicked", NULL, quitGui);
-      //  Window::mainWindow->connectSignal("remove", this, GuiExec::quitGui);
-      Window::mainWindow->connectSignal("destroy", NULL, quitGui);
-      
-      windowBox->fill(quitButton);
-    }
-    guiMainWindow->fill(windowBox);
-  }
-  Window::mainWindow->showall();
-  Window::mainWindow->setSize(300, 500);
-}
-
-void* Framework::mainloopGui(void* tmp)
-{
-  mainloopGUI();
-}
-
-
 
 int main(int argc, char *argv[])
@@ -494,9 +258,8 @@
   Framework* framework = Framework::getInstance();
 
-  framework->initGui((void*)argv);
+  framework->moduleInitGui();
   //  framework->mainloopGui(NULL);
 
   framework->mainLoop(NULL);
-
 
   delete framework;
Index: /orxonox/branches/physics/src/subprojects/particles/framework.h
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4332)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4333)
@@ -4,4 +4,6 @@
 #include "vector.h"
 #include "glincl.h"
+
+#include "gui_gtk.h"
 
 
@@ -25,14 +27,23 @@
   Uint32 currFrame;
     
-  Uint8* keys; // This variable will be used in the keyboard routine
+  Uint8* keys;        // This variable will be used in the keyboard routine
   bool mouseDown[MOUSE_BUTTON_COUNT];
 
  public:
-  ~Framework();
+  ~Framework(); 
   
   static Framework* getInstance(void);
 
 
-  void initModule();
+  void moduleInit();
+  void* moduleInitGui(void);
+
+  void moduleDraw(float dt);
+  void moduleTick(float dt);
+  
+  void moduleHelp(void) const;
+
+
+
   static void* mainLoop(void* tmp);
   bool draw(float dt);
@@ -41,5 +52,4 @@
   void quit();
 
-  void* initGui(void* argv);
   static void* mainloopGui(void* tmp);
 
@@ -47,3 +57,6 @@
 };
 
+int quitGui(GtkWidget* widget, void* data);
+
+
 #endif /* _FRAMEWORK_H */
Index: /orxonox/branches/physics/src/subprojects/particles/particle_fun.cc
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/particle_fun.cc	(revision 4333)
+++ /orxonox/branches/physics/src/subprojects/particles/particle_fun.cc	(revision 4333)
@@ -0,0 +1,272 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+
+   this file extends the framework file, so it renders what i want.
+*/
+
+#include "framework.h"
+
+#include "gui_gtk.h"
+#include "physics_engine.h"
+#include "particle_engine.h"
+
+
+void Framework::moduleInit()
+{
+  // Creating a Test Particle System
+  ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
+
+  // Creating a Test Particle Emitter
+  ParticleEmitter* emitter = new ParticleEmitter(Vector(0 , 1, 0));
+  // Add the Flow from the Emitter into the System
+  ParticleEngine::getInstance()->addConnection(emitter, system);
+}
+
+
+void Framework::moduleDraw(float dt)
+{
+  ParticleEngine::getInstance()->draw(dt);
+}
+
+
+void Framework::moduleTick(float dt)
+{
+  ParticleEngine::getInstance()->tick(dt);
+}
+
+
+void Framework::moduleHelp(void) const
+{
+  PRINT(0)("i - state Information\n\n");
+  PRINT(0)("\n");
+
+}
+
+
+
+
+
+
+
+int emitterChange(GtkWidget* nonInterest, void* widget)
+{
+  Option* option = (Option*) widget;
+  const char* name = option->getTitle();
+  char* valueC = option->save();
+  float value = atof(valueC);
+
+  ParticleEmitter* tmpEmit = ParticleEngine::getInstance()->getEmitterByNumber(1);
+  if (tmpEmit)
+    {
+      if (!strcmp(name, "EmissionRate"))
+	{
+	  tmpEmit->setEmissionRate(value);
+	  PRINT(3)("EmissionRate set to %f\n", value);
+	}
+      else if (!strcmp(name, "Velocity"))
+	{
+	  tmpEmit->setEmissionVelocity(value);
+	  PRINT(3)("Velocity set to %f\n", value);
+	}
+      else if(!strcmp(name, "SpreadAngle"))
+	{
+	  tmpEmit->setSpread(value);
+	  PRINT(3)("SpreadAngle set to %f\n", value);
+	}
+      else if(!strcmp(name, "EmitterType"))
+	{
+	  if (!strcmp(valueC, "EMITTER_DOT"))
+	    tmpEmit->setType(EMITTER_DOT);
+	  else if (!strcmp(valueC, "EMITTER_PLANE"))
+	    tmpEmit->setType(EMITTER_PLANE);
+	  else if (!strcmp(valueC, "EMITTER_CUBE"))
+	    tmpEmit->setType(EMITTER_CUBE);
+	  PRINT(3)("EmitterType set to %s\n", valueC);	  
+	}
+      else if(!strcmp(name, "EmitterSize"))
+	{
+	  tmpEmit->setSize(value);
+	  PRINT(3)("EmitterSize set to %f\n", value);
+	}
+    }
+  delete valueC;
+}
+
+
+int systemChange(GtkWidget* nonInterest, void* widget)
+{
+  Option* option = (Option*) widget;
+  const char* name = option->getTitle();
+  char* valueC = option->save();
+  float value = atof(valueC);
+
+  ParticleSystem* tmpSys = ParticleEngine::getInstance()->getSystemByNumber(1);
+  if (tmpSys)
+    {
+      if (!strcmp(name, "StartRadius"))
+	{
+	  tmpSys->setRadius(value, tmpSys->getEndRadius());
+	  PRINT(3)("ParticleStartRadius set to %f\n", value);
+	}
+      else if (!strcmp(name, "EndRadius"))
+	{
+	  tmpSys->setRadius( tmpSys->getStartRadius(), value);
+	  PRINT(3)("ParticleEndRadius set to %f\n", value);
+	}
+
+      else if (!strcmp(name, "LifeSpan"))
+	{
+	  tmpSys->setLifeSpan(value);
+	  PRINT(3)("ParticleLifeSpan set to %f\n", value);
+	}
+
+      else if (!strcmp(name, "ConserveFactor"))
+	{
+	  tmpSys->setConserve(value);
+	  PRINT(3)("ParticleConserveFactor set to %f\n", value);
+	}
+
+      else if (!strcmp(name, "ParticleType"))
+	{
+	  if (!strcmp(valueC, "PARTICLE_DOT"))
+	    tmpSys->setType(PARTICLE_DOT);
+	  else if (!strcmp(valueC, "PARTICLE_SPARK"))
+	    tmpSys->setType(PARTICLE_SPARK);
+	  else if (!strcmp(valueC, "PARTICLE_SPRITE"))
+	    tmpSys->setType(PARTICLE_SPRITE);
+
+	  PRINT(3)("ParticleType set to %s\n", valueC);
+	}
+
+      else if (!strcmp(name, "InheritSpeed"))
+	{
+	  tmpSys->setInheritSpeed(value);
+	  PRINT(3)("ParticleInheritSpeed set to %f\n", value);
+	}
+
+    }
+  delete valueC;
+}
+
+
+void* Framework::moduleInitGui(void)
+{
+  Window* guiMainWindow = NULL;
+  
+  initGUI(0, NULL);
+  
+  guiMainWindow = new Window("ParticlesFUN");
+  {
+    Box* windowBox = new Box('v');
+    {
+      Frame* emitterFrame = new Frame("emitter-settings");
+      {
+	Box* emitterBox = new Box('v');
+	{
+	  emitterBox->fill(new Label("EmissionRate"));
+	  Slider* EmissionRate = new Slider("EmissionRate", 0, 1000);
+	  EmissionRate->connectSignal("value_changed", (void*)EmissionRate, emitterChange );
+	  emitterBox->fill(EmissionRate);
+	  
+	  emitterBox->fill(new Label("Velocity"));
+	  Slider* velocity = new Slider("Velocity", 0, 2);
+	  velocity->setExactness(3);
+	  velocity->connectSignal("value_changed", (void*)velocity, emitterChange );
+	  emitterBox->fill(velocity);
+	  
+	  emitterBox->fill(new Label("SpreadAngle"));
+	  Slider* SpreadAngle = new Slider("SpreadAngle", 0, M_PI);
+	  SpreadAngle->setExactness(3);
+	  SpreadAngle->connectSignal("value_changed", (void*)SpreadAngle, emitterChange );
+	  emitterBox->fill(SpreadAngle);
+
+	  emitterBox->fill(new Label("EmitterType"));
+	  Menu* EmitterType = new Menu("EmitterType");
+	  EmitterType->addItem("EMITTER_DOT");
+	  EmitterType->addItem("EMITTER_PLANE");
+	  EmitterType->addItem("EMITTER_CUBE");
+	  EmitterType->connectSignal("changed", (void*)EmitterType, emitterChange );	  
+	  emitterBox->fill(EmitterType);
+
+	  emitterBox->fill(new Label("EmitterSize"));
+	  Slider* EmitterSize = new Slider("EmitterSize", 0, 100);
+	  EmitterSize->setExactness(1);
+	  EmitterSize->connectSignal("value_changed", (void*)EmitterSize, emitterChange );
+	  emitterBox->fill(EmitterSize);
+	}
+	emitterFrame->fill(emitterBox);
+      }
+      windowBox->fill(emitterFrame);
+      
+      Frame* systemFrame = new Frame("system-settings");
+      {
+	Box* systemBox = new Box('v');
+	{
+	  systemBox->fill(new Label("StartRadius"));
+	  Slider* StartRadius = new Slider("StartRadius", 0, 10);
+	  StartRadius->setExactness(3);
+	  StartRadius->connectSignal("value_changed", (void*)StartRadius, systemChange );
+	  systemBox->fill(StartRadius);
+
+	  systemBox->fill(new Label("EndRadius"));
+	  Slider* EndRadius = new Slider("EndRadius", 0, 10);
+	  EndRadius->setExactness(3);
+	  EndRadius->connectSignal("value_changed", (void*)EndRadius, systemChange );
+	  systemBox->fill(EndRadius);
+
+	  systemBox->fill(new Label("LifeSpan"));
+	  Slider* LifeSpan = new Slider("LifeSpan", 0, 10);
+	  LifeSpan->setExactness(3);
+	  LifeSpan->connectSignal("value_changed", (void*)LifeSpan, systemChange );
+	  systemBox->fill(LifeSpan);
+	  
+	  systemBox->fill(new Label("ConserveFactor"));
+	  Slider* ConserveFactor = new Slider("ConserveFactor", 0, 1);
+	  ConserveFactor->setExactness(3);
+	  ConserveFactor->connectSignal("value_changed", (void*)ConserveFactor, systemChange );
+	  systemBox->fill(ConserveFactor);
+
+	  systemBox->fill(new Label("ParticleType"));
+	  Menu* ParticleType = new Menu("ParticleType");
+	  ParticleType->addItem("PARTICLE_DOT");
+	  ParticleType->addItem("PARTICLE_SPARK");
+	  ParticleType->addItem("PARTICLE_SPRITE");
+	  ParticleType->connectSignal("changed", (void*)ParticleType, systemChange );	  
+	  systemBox->fill(ParticleType);
+	  
+	  systemBox->fill(new Label("InheritSpeed"));
+	  Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1);
+	  InheritSpeed->setExactness(3);
+	  InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, systemChange );
+	  systemBox->fill(InheritSpeed);
+
+
+	}
+	systemFrame->fill(systemBox);
+      }
+      windowBox->fill(systemFrame);
+      
+      Button* quitButton = new Button("quit");
+      
+      quitButton->connectSignal("clicked", NULL, quitGui);
+      //  Window::mainWindow->connectSignal("remove", this, GuiExec::quitGui);
+      Window::mainWindow->connectSignal("destroy", NULL, quitGui);
+      
+      windowBox->fill(quitButton);
+    }
+    guiMainWindow->fill(windowBox);
+  }
+  Window::mainWindow->showall();
+  Window::mainWindow->setSize(300, 500);
+}
