Index: branches/mountain_lake/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/mountain_lake/src/world_entities/environments/mapped_water.cc	(revision 8915)
+++ branches/mountain_lake/src/world_entities/environments/mapped_water.cc	(revision 8916)
@@ -181,5 +181,5 @@
 
 /**
- * @brief initialization of the shaders
+ * @brief calculates the 4 verts of the water quad
  */
 void MappedWater::calcVerts()
@@ -211,23 +211,4 @@
   this->shader->deactivateShader();
 }
-
-void MappedWater::resetWaterColorR(float r)
-{
-  this->resetWaterColor(r, this->waterColor.y, this->waterColor.z);
-}
-
-
-void MappedWater::resetWaterColorG(float g)
-{
-  this->resetWaterColor(this->waterColor.x, g, this->waterColor.z);
-}
-
-
-void MappedWater::resetWaterColorB(float b)
-{
-  this->resetWaterColor(this->waterColor.x, this->waterColor.y, b);
-}
-
-
 
 /**
@@ -330,5 +311,7 @@
 }
 
-
+/**
+ * @brief starts the slider gui that lets you edit all water parameters
+ */
 void MappedWater::openGui()
 {
@@ -337,30 +320,123 @@
     this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
     {
-      OrxGui::GLGuiBox* colorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
       {
-        OrxGui::GLGuiInputLine* ColorText = new OrxGui::GLGuiInputLine();
-        ColorText->setText("Color");
-        colorBox->pack(ColorText);
+        OrxGui::GLGuiInputLine* waterColorText = new OrxGui::GLGuiInputLine();
+        waterColorText->setText("Color");
+        waterColorBox->pack(waterColorText);
 
         OrxGui::GLGuiSlider* waterColorR = new OrxGui::GLGuiSlider();
-        waterColorR->setRange(0, 1.0);
+        waterColorR->setRange(0, 1.0f);
         waterColorR->setValue(this->waterColor.x);
+        waterColorR->setStep(0.1f);
         waterColorR->connect(SIGNAL(waterColorR, valueChanged), this, SLOT(MappedWater, resetWaterColorR));
-        colorBox->pack(waterColorR);
+        waterColorBox->pack(waterColorR);
 
         OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider();
-        waterColorG->setRange(0, 1.0);
+        waterColorG->setRange(0, 1.0f);
+        waterColorR->setStep(0.1f);
         waterColorG->setValue(this->waterColor.y);
         waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG));
-        colorBox->pack(waterColorG);
+        waterColorBox->pack(waterColorG);
 
         OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider();
-        waterColorB->setRange(0, 1.0);
+        waterColorB->setRange(0, 1.0f);
+        waterColorR->setStep(0.1f);
         waterColorB->setValue(this->waterColor.z);
         waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB));
-        colorBox->pack(waterColorB);
+        waterColorBox->pack(waterColorB);
 
       }
-      this->box->pack(colorBox);
+      this->box->pack(waterColorBox);
+
+      OrxGui::GLGuiBox* waterUVBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* waterUVText = new OrxGui::GLGuiInputLine();
+        waterUVText->setText("WaterUV");
+        waterUVBox->pack(waterUVText);
+
+        OrxGui::GLGuiSlider* waterUV = new OrxGui::GLGuiSlider();
+        waterUV->setRange(1, 20);
+        waterUV->setValue(this->waterUV);
+        waterUV->setStep(1);
+        waterUV->connect(SIGNAL(waterUV, valueChanged), this, SLOT(MappedWater, setWaterUV));
+        waterUVBox->pack(waterUV);
+      }
+      this->box->pack(waterUVBox);
+
+      OrxGui::GLGuiBox* waterFlowBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* waterFlowText = new OrxGui::GLGuiInputLine();
+        waterFlowText->setText("WaterFlow");
+        waterFlowBox->pack(waterFlowText);
+
+        OrxGui::GLGuiSlider* waterFlow = new OrxGui::GLGuiSlider();
+        waterFlow->setRange(0.01f, 2);
+        waterFlow->setValue(this->waterFlow);
+        waterFlow->setStep(0.02f);
+        waterFlow->connect(SIGNAL(waterFlow, valueChanged), this, SLOT(MappedWater, setWaterFlow));
+        waterFlowBox->pack(waterFlow);
+      }
+      this->box->pack(waterFlowBox);
+
+      OrxGui::GLGuiBox* shineSizeBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* shineSizeText = new OrxGui::GLGuiInputLine();
+        shineSizeText->setText("ShineSize");
+        shineSizeBox->pack(shineSizeText);
+
+        OrxGui::GLGuiSlider* shineSize = new OrxGui::GLGuiSlider();
+        shineSize->setRange(1, 128);
+        shineSize->setValue(this->shineSize);
+        shineSize->setStep(1);
+        shineSize->connect(SIGNAL(shineSize, valueChanged), this, SLOT(MappedWater, resetShineSize));
+        shineSizeBox->pack(shineSize);
+      }
+      this->box->pack(shineSizeBox);
+
+      OrxGui::GLGuiBox* shineStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* shineStrengthText = new OrxGui::GLGuiInputLine();
+        shineStrengthText->setText("ShineStrength");
+        shineStrengthBox->pack(shineStrengthText);
+
+        OrxGui::GLGuiSlider* shineStrength = new OrxGui::GLGuiSlider();
+        shineStrength->setRange(0, 1);
+        shineStrength->setValue(this->shineStrength);
+        shineStrength->setStep(0.1f);
+        shineStrength->connect(SIGNAL(shineStrength, valueChanged), this, SLOT(MappedWater, resetShineStrength));
+        shineStrengthBox->pack(shineStrength);
+      }
+      this->box->pack(shineStrengthBox);
+
+      OrxGui::GLGuiBox* reflStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* reflStrengthText = new OrxGui::GLGuiInputLine();
+        reflStrengthText->setText("ReflStrength");
+        reflStrengthBox->pack(reflStrengthText);
+
+        OrxGui::GLGuiSlider* reflStrength = new OrxGui::GLGuiSlider();
+        reflStrength->setRange(0, 1);
+        reflStrength->setValue(this->reflStrength);
+        reflStrength->setStep(0.1f);
+        reflStrength->connect(SIGNAL(reflStrength, valueChanged), this, SLOT(MappedWater, resetReflStrength));
+        reflStrengthBox->pack(reflStrength);
+      }
+      this->box->pack(reflStrengthBox);
+
+      OrxGui::GLGuiBox* refractionBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* refractionText = new OrxGui::GLGuiInputLine();
+        refractionText->setText("Refraction");
+        refractionBox->pack(refractionText);
+
+        OrxGui::GLGuiSlider* refraction = new OrxGui::GLGuiSlider();
+        refraction->setRange(0.001f, 0.1f);
+        refraction->setValue(this->refraction);
+        refraction->setStep(0.004f);
+        refraction->connect(SIGNAL(refraction, valueChanged), this, SLOT(MappedWater, resetRefraction));
+        refractionBox->pack(refraction);
+      }
+      this->box->pack(refractionBox);
 
     }
@@ -374,12 +450,12 @@
 }
 
-
+/**
+ * @brief closes the water gui
+ */
 void MappedWater::closeGui()
 {
   delete this->box;
   this->box = NULL;
-
-}
-
+}
 
 /**
@@ -450,24 +526,87 @@
 
   // fading
-  if(this->shineSize != this->newShineSize)
-  {
-    if(bFadeShineSize)
-    {
-      this->shineSizeFader = new tAnimation<MappedWater>(this, &MappedWater::resetShineSize);
-      this->shineSizeFader->setInfinity(ANIM_INF_CONSTANT);
-
-      this->shineSizeFader->addKeyFrame(this->shineSize, this->shineSizeFadeTime, ANIM_LINEAR);
-      this->shineSizeFader->addKeyFrame(this->newShineSize, 0, ANIM_LINEAR);
-
-      bFadeShineSize = false;
-      this->shineSizeFader->replay();
-    }
-  }
-
-  if(this->tempcounter == 100)
-  {
-    PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");
-    this->fadeShineSize(1, 10);
-  }
+  if(bFadeWaterUV)
+  {
+    this->waterUVFader = new tAnimation<MappedWater>(this, &MappedWater::setWaterUV);
+    this->waterUVFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->waterUVFader->addKeyFrame(this->waterUV, this->waterUVFadeTime, ANIM_LINEAR);
+    this->waterUVFader->addKeyFrame(this->newWaterUV, 0, ANIM_LINEAR);
+
+    bFadeWaterUV = false;
+    this->waterUVFader->replay();
+  }
+
+  if(bFadeWaterFlow)
+  {
+    this->waterFlowFader = new tAnimation<MappedWater>(this, &MappedWater::setWaterFlow);
+    this->waterFlowFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->waterFlowFader->addKeyFrame(this->waterFlow, this->waterFlowFadeTime, ANIM_LINEAR);
+    this->waterFlowFader->addKeyFrame(this->newWaterFlow, 0, ANIM_LINEAR);
+
+    bFadeWaterFlow = false;
+    this->waterFlowFader->replay();
+  }
+
+  if(bFadeShineSize)
+  {
+    this->shineSizeFader = new tAnimation<MappedWater>(this, &MappedWater::resetShineSize);
+    this->shineSizeFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->shineSizeFader->addKeyFrame(this->shineSize, this->shineSizeFadeTime, ANIM_LINEAR);
+    this->shineSizeFader->addKeyFrame(this->newShineSize, 0, ANIM_LINEAR);
+
+    bFadeShineSize = false;
+    this->shineSizeFader->replay();
+  }
+
+  if(bFadeShineStrength)
+  {
+    this->shineStrengthFader = new tAnimation<MappedWater>(this, &MappedWater::resetShineStrength);
+    this->shineStrengthFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->shineStrengthFader->addKeyFrame(this->shineStrength, this->shineStrengthFadeTime, ANIM_LINEAR);
+    this->shineStrengthFader->addKeyFrame(this->newShineStrength, 0, ANIM_LINEAR);
+
+    bFadeShineStrength = false;
+    this->shineStrengthFader->replay();
+  }
+
+  if(bFadeReflStrength)
+  {
+    this->reflStrengthFader = new tAnimation<MappedWater>(this, &MappedWater::resetReflStrength);
+    this->reflStrengthFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->reflStrengthFader->addKeyFrame(this->reflStrength, this->reflStrengthFadeTime, ANIM_LINEAR);
+    this->reflStrengthFader->addKeyFrame(this->newReflStrength, 0, ANIM_LINEAR);
+
+    bFadeReflStrength = false;
+    this->reflStrengthFader->replay();
+  }
+
+  if(bFadeRefraction)
+  {
+    this->refractionFader = new tAnimation<MappedWater>(this, &MappedWater::resetRefraction);
+    this->refractionFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->refractionFader->addKeyFrame(this->refraction, this->refractionFadeTime, ANIM_LINEAR);
+    this->refractionFader->addKeyFrame(this->newRefraction, 0, ANIM_LINEAR);
+
+    bFadeRefraction = false;
+    this->refractionFader->replay();
+  }
+
+
+//   if(this->tempcounter == 300)
+//   {
+//     PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");
+//     this->fadeWaterUV(1, 10);
+//   }
+//   if(this->tempcounter == 100)
+//   {
+//     PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");
+//     this->fadeWaterFlow(1, 10);
+//   }
   //PRINTF(0)("counter %i/n", tempcounter);
   tempcounter++;
Index: branches/mountain_lake/src/world_entities/environments/mapped_water.h
===================================================================
--- branches/mountain_lake/src/world_entities/environments/mapped_water.h	(revision 8915)
+++ branches/mountain_lake/src/world_entities/environments/mapped_water.h	(revision 8916)
@@ -1,3 +1,3 @@
-/*!
+ /*!
  * @file mapped_water.h
  *  worldentity for flat, cool looking, mapped water
@@ -62,11 +62,11 @@
   void setWaterAngle(float angle) { this->waterAngle = angle; }
   void setWaterColor(float r, float g, float b) { this->waterColor = Vector(r,g,b); }
-  void setWaterUV(float uv) { this->waterUV = uv; }
-  void setWaterFlow(float flow) { this->waterFlow = flow; };
+  void setWaterUV(float uv) { this->waterUV = uv; this->bFadeWaterUV = false; }
+  void setWaterFlow(float flow) { this->waterFlow = flow; this->bFadeWaterFlow = false; }
   void setNormalMapScale(float scale) { this->kNormalMapScale = scale; }
-  void setShineSize(float shine) { this->shineSize = shine; this->newShineSize = shine; }
-  void setShineStrength(float strength) { this->shineStrength = strength; }
-  void setReflStrength(float strength) { this->reflStrength = strength; }
-  void setRefraction(float refraction) { this->refraction = refraction; }
+  void setShineSize(float shine) { this->shineSize = shine; this->bFadeShineSize = false; }
+  void setShineStrength(float strength) { this->shineStrength = strength; this->bFadeShineStrength = false; }
+  void setReflStrength(float strength) { this->reflStrength = strength; this->bFadeReflStrength = false; }
+  void setRefraction(float refraction) { this->refraction = refraction; this->bFadeRefraction = false;}
 
   // functions to change water parameters during runtime
@@ -78,7 +78,7 @@
   void resetWaterAngle(float angle) { this->setWaterAngle(angle); this->calcVerts(); }
   void resetWaterColor(float r, float g, float b);
-  void resetWaterColorR(float r);
-  void resetWaterColorG(float g);
-  void resetWaterColorB(float b);
+  void resetWaterColorR(float r) { this->resetWaterColor(r, this->waterColor.y, this->waterColor.z); }
+  void resetWaterColorG(float g) { this->resetWaterColor(this->waterColor.x, g, this->waterColor.z); }
+  void resetWaterColorB(float b) { this->resetWaterColor(this->waterColor.x, this->waterColor.y, b); }
   void resetShineSize(float shine);
   void resetShineStrength(float strength);
@@ -86,8 +86,11 @@
   void resetRefraction(float refraction);
 
-  // fade functions, hacky HACK
-  void fadeWaterColor(float r, float g, float b, float time) {  }
-  void fadeShineSize(float shine, float time) {this->newShineSize = shine; this->shineSizeFadeTime = time; }
-  void fadeLightPos(float x, float y, float z, float time);
+  // fading functions
+  void fadeWaterUV(float uv, float time) { this->newWaterUV = uv; this->waterUVFadeTime = time; this->bFadeWaterUV = true; }
+  void fadeWaterFlow(float flow, float time) { this->newWaterFlow = flow; this->waterFlowFadeTime = time; this->bFadeWaterFlow = true; }
+  void fadeShineSize(float shine, float time) { this->newShineSize = shine; this->shineSizeFadeTime = time; this->bFadeShineSize = true; }
+  void fadeShineStrength(float strength, float time) { this->newShineStrength = strength; this->shineStrengthFadeTime = time; this->bFadeShineStrength = true; }
+  void fadeReflStrength(float strength, float time) { this->newReflStrength = strength; this->reflStrengthFadeTime = time; this->bFadeReflStrength = true; }
+  void fadeRefraction(float refraction, float time) { this->newRefraction = refraction; this->refractionFadeTime = time; this->bFadeRefraction = true; }
 
 private:
@@ -134,8 +137,28 @@
 
   // fading
+  tAnimation<MappedWater>*      waterUVFader;
+  float                         newWaterUV;
+  float                         waterUVFadeTime;
+  bool                          bFadeWaterUV ;
+  tAnimation<MappedWater>*      waterFlowFader;
+  float                         newWaterFlow;
+  float                         waterFlowFadeTime;
+  bool                          bFadeWaterFlow;
   tAnimation<MappedWater>*      shineSizeFader;
   float                         newShineSize;
   float                         shineSizeFadeTime;
   bool                          bFadeShineSize;
+  tAnimation<MappedWater>*      shineStrengthFader;
+  float                         newShineStrength;
+  float                         shineStrengthFadeTime;
+  bool                          bFadeShineStrength;
+  tAnimation<MappedWater>*      reflStrengthFader;
+  float                         newReflStrength;
+  float                         reflStrengthFadeTime;
+  bool                          bFadeReflStrength;
+  tAnimation<MappedWater>*      refractionFader;
+  float                         newRefraction;
+  float                         refractionFadeTime;
+  bool                          bFadeRefraction;
 
   OrxGui::GLGuiBox*             box;
