Index: /orxonox/branches/physics/src/subprojects/particles/framework.cc
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4326)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4327)
@@ -364,5 +364,4 @@
   char* valueC = option->save();
   float value = atof(valueC);
-  delete valueC;
 
   ParticleEmitter* tmpEmit = ParticleEngine::getInstance()->getEmitterByNumber(1);
@@ -370,16 +369,82 @@
     {
       if (!strcmp(name, "EmissionRate"))
-      {
-	tmpEmit->setEmissionRate(value);
-	PRINT(3)("EmissionRate set to %f\n", value);
-      }
+	{
+	  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);
-      }
+	{
+	  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);
+	}
     }
-  
-
+
+  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 %f\n", valueC);
+	}
+
+      else if (!strcmp(name, "InheritSpeed"))
+	{
+	  tmpSys->setInheritSpeed(value);
+	  PRINT(3)("ParticleInheritSpeed set to %f\n", value);
+	}
+
+    }
+
+  delete valueC;
 }
 
@@ -395,22 +460,94 @@
     Box* windowBox = new Box('v');
     {
-      Slider* EmissionRate = new Slider("EmissionRate", 0, 1000);
-      EmissionRate->connectSignal("value_changed", (void*)EmissionRate, changeOption );
-      windowBox->fill(EmissionRate);
-
-      Slider* velocity = new Slider("Velocity", 0, 2);
-      velocity->setExactness(3);
-      velocity->connectSignal("value_changed", (void*)velocity, changeOption );
-      windowBox->fill(velocity);
-
-      Slider* SpreadAngle = new Slider("SpreadAngle", 0, 1000);
-      SpreadAngle->connectSignal("value_changed", (void*)SpreadAngle, changeOption );
-      windowBox->fill(SpreadAngle);
-
+      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, changeOption );
+	  emitterBox->fill(EmissionRate);
+	  
+	  emitterBox->fill(new Label("Velocity"));
+	  Slider* velocity = new Slider("Velocity", 0, 2);
+	  velocity->setExactness(3);
+	  velocity->connectSignal("value_changed", (void*)velocity, changeOption );
+	  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, changeOption );
+	  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, changeOption );	  
+	  emitterBox->fill(EmitterType);
+
+	  emitterBox->fill(new Label("EmitterSize"));
+	  Slider* EmitterSize = new Slider("EmitterSize", 0, 100);
+	  EmitterSize->setExactness(1);
+	  EmitterSize->connectSignal("value_changed", (void*)EmitterSize, changeOption );
+	  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, changeOption );
+	  systemBox->fill(StartRadius);
+
+	  systemBox->fill(new Label("EndRadius"));
+	  Slider* EndRadius = new Slider("EndRadius", 0, 10);
+	  EndRadius->setExactness(3);
+	  EndRadius->connectSignal("value_changed", (void*)EndRadius, changeOption );
+	  systemBox->fill(EndRadius);
+
+	  systemBox->fill(new Label("LifeSpan"));
+	  Slider* LifeSpan = new Slider("LifeSpan", 0, 10);
+	  LifeSpan->setExactness(3);
+	  LifeSpan->connectSignal("value_changed", (void*)LifeSpan, changeOption );
+	  systemBox->fill(LifeSpan);
+	  
+	  systemBox->fill(new Label("ConserveFactor"));
+	  Slider* ConserveFactor = new Slider("ConserveFactor", 0, 1);
+	  ConserveFactor->setExactness(3);
+	  ConserveFactor->connectSignal("value_changed", (void*)ConserveFactor, changeOption );
+	  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, changeOption );	  
+	  systemBox->fill(ParticleType);
+	  
+	  systemBox->fill(new Label("InheritSpeed"));
+	  Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1);
+	  InheritSpeed->setExactness(3);
+	  InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, changeOption );
+	  systemBox->fill(InheritSpeed);
+
+
+	}
+	systemFrame->fill(systemBox);
+      }
+      windowBox->fill(systemFrame);
+      
       Button* quitButton = new Button("quit");
-
-
+      
+      
       windowBox->fill(quitButton);
     }
@@ -418,4 +555,5 @@
   }
   Window::mainWindow->showall();
+  Window::mainWindow->setSize(300, 500);
   mainloopGUI();
 }
