Index: branches/mountain_lake/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/mountain_lake/src/world_entities/environments/mapped_water.cc	(revision 8917)
+++ branches/mountain_lake/src/world_entities/environments/mapped_water.cc	(revision 8918)
@@ -21,8 +21,5 @@
 #include "t_animation.h"
 #include "math.h"
-
 #include "glgui.h"
-
-
 #include "shell_command.h"
 
@@ -56,5 +53,5 @@
   this->calcVerts();
 
-  tempcounter = 0;
+  // init gui
   this->box = NULL;
 }
@@ -100,4 +97,15 @@
   this->move = 0;
   this->move2 = this->move * this->kNormalMapScale;
+
+  // initalize fading bools
+  this->bFadeWaterHeight = false;
+  this->bFadeWaterUV = false;
+  this->bFadeWaterFlow = false;
+  this->bFadeShineSize = false;
+  this->bFadeShineStrength = false;
+  this->bFadeReflStrength = false;
+  this->bFadeRefraction = false;
+
+  this->tempcounter = 0;
 }
 
@@ -323,5 +331,5 @@
       {
         OrxGui::GLGuiInputLine* waterColorText = new OrxGui::GLGuiInputLine();
-        waterColorText->setText("Color");
+        waterColorText->setText("WaterColor");
         waterColorBox->pack(waterColorText);
 
@@ -335,5 +343,5 @@
         OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider();
         waterColorG->setRange(0, 1.0f);
-        waterColorR->setStep(0.1f);
+        waterColorG->setStep(0.1f);
         waterColorG->setValue(this->waterColor.y);
         waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG));
@@ -342,9 +350,8 @@
         OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider();
         waterColorB->setRange(0, 1.0f);
-        waterColorR->setStep(0.1f);
+        waterColorB->setStep(0.1f);
         waterColorB->setValue(this->waterColor.z);
         waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB));
         waterColorBox->pack(waterColorB);
-
       }
       this->box->pack(waterColorBox);
@@ -440,5 +447,49 @@
       this->box->pack(refractionBox);
 
+      OrxGui::GLGuiBox* lightPosBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* lightPosText = new OrxGui::GLGuiInputLine();
+        lightPosText->setText("LightPos");
+        lightPosBox->pack(lightPosText);
+
+        OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider();
+        lightPosX->setRange(-600, 600);
+        lightPosX->setValue(this->lightPos.x);
+        lightPosX->setStep(15);
+        lightPosX->connect(SIGNAL(lightPosX, valueChanged), this, SLOT(MappedWater, resetLightPosX));
+        lightPosBox->pack(lightPosX);
+
+        OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider();
+        lightPosY->setRange(-600, 600);
+        lightPosY->setStep(15);
+        lightPosY->setValue(this->lightPos.y);
+        lightPosY->connect(SIGNAL(lightPosY, valueChanged), this, SLOT(MappedWater, resetLightPosY));
+        lightPosBox->pack(lightPosY);
+
+        OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider();
+        lightPosZ->setRange(-600, 600);
+        lightPosZ->setStep(15);
+        lightPosZ->setValue(this->lightPos.z);
+        lightPosZ->connect(SIGNAL(lightPosZ, valueChanged), this, SLOT(MappedWater, resetLightPosZ));
+        lightPosBox->pack(lightPosZ);
+      }
+      this->box->pack(lightPosBox);
+
+      OrxGui::GLGuiBox* waterHeightBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        OrxGui::GLGuiInputLine* waterHeightText = new OrxGui::GLGuiInputLine();
+        waterHeightText->setText("WaterHeight");
+        waterHeightBox->pack(waterHeightText);
+
+        OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider();
+        waterHeight->setRange(-500, 500);
+        waterHeight->setValue(this->waterHeight);
+        waterHeight->setStep(10);
+        waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight));
+        waterHeightBox->pack(waterHeight);
+      }
+      this->box->pack(waterHeightBox);
     }
+
     this->box->showAll();
     this->box->setAbsCoor2D(300, 40);
@@ -446,6 +497,4 @@
     OrxGui::GLGuiHandler::getInstance()->activateCursor();
   }
-
-
 }
 
@@ -598,4 +647,16 @@
   }
 
+  if(bFadeWaterHeight)
+  {
+    this->waterHeightFader = new tAnimation<MappedWater>(this, &MappedWater::setWaterHeight);
+    this->waterHeightFader->setInfinity(ANIM_INF_CONSTANT);
+
+    this->waterHeightFader->addKeyFrame(this->waterHeight, this->waterHeightFadeTime, ANIM_LINEAR);
+    this->waterHeightFader->addKeyFrame(this->newWaterHeight, 0, ANIM_LINEAR);
+
+    bFadeWaterHeight = false;
+    this->waterHeightFader->replay();
+  }
+
 
 //   if(this->tempcounter == 300)
@@ -604,9 +665,9 @@
 //     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);
-//   }
+  if(this->tempcounter == 100)
+  {
+    PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");
+    this->fadeWaterHeight(0, 15);
+  }
   //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 8917)
+++ branches/mountain_lake/src/world_entities/environments/mapped_water.h	(revision 8918)
@@ -50,23 +50,22 @@
   void deactivateRefraction();
 
-
+  // slider gui to edit water params during gameplay
   void openGui();
   void closeGui();
-
-
 
   // functions to set parameters for the water, usually they're called through loadparam
   void setLightPos(float x, float y, float z) { this->lightPos = Vector(x,y,z); }
   void setWaterPos(float x, float y, float z) { this->waterHeight = y; this->waterVerts[0] = x; this->waterVerts[1] = z; }
+  void setWaterHeight(float y) { this->waterHeight = y;  }
   void setWaterSize(float x, float z) { this->xWidth = x; this->zWidth = z; }
   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; this->bFadeWaterUV = false; }
-  void setWaterFlow(float flow) { this->waterFlow = flow; this->bFadeWaterFlow = false; }
+  void setWaterUV(float uv) { this->waterUV = uv; }
+  void setWaterFlow(float flow) { this->waterFlow = flow; }
   void setNormalMapScale(float scale) { this->kNormalMapScale = scale; }
-  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;}
+  void setShineSize(float shine) { this->shineSize = shine; }
+  void setShineStrength(float strength) { this->shineStrength = strength; }
+  void setReflStrength(float strength) { this->reflStrength = strength; }
+  void setRefraction(float refraction) { this->refraction = refraction; }
 
   // functions to change water parameters during runtime
@@ -74,4 +73,7 @@
   // don't reset kNormalMapScale (because it won't change anything)
   void resetLightPos(float x, float y, float z);
+  void resetLightPosX(float x) { this->resetLightPos(x, this->lightPos.y, this->lightPos.z); }
+  void resetLightPosY(float y) { this->resetLightPos(this->lightPos.x, y, this->lightPos.z); }
+  void resetLightPosZ(float z) { this->resetLightPos(this->lightPos.x, this->lightPos.y, z); }
   void resetWaterPos(float x, float y, float z) { this->setWaterPos(x, y, z); this->calcVerts(); }
   void resetWaterSize(float x, float z) { this->setWaterSize(x, z); this->calcVerts(); }
@@ -93,4 +95,5 @@
   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; }
+  void fadeWaterHeight(float y, float time) { this->newWaterHeight = y; this->waterHeightFadeTime = time; this->bFadeWaterHeight = true; }
 
 private:
@@ -101,66 +104,69 @@
 
 private:
-  Material            mat;
-  Shader*             shader;
+  Material                  mat;
+  Shader*                   shader;
+  OrxGui::GLGuiBox*         box;
 
   // water size and position
-  float               waterHeight;            //!< position of the water
-  float               waterVerts[8];          //!< coords of the 4 vertexes of the water quad
-  float               xWidth, zWidth;         //!< size of the water quad
-  float               waterAngle;             //!< defines how much the water will be turned around the point waterPos
+  float                     waterHeight;            //!< position of the water
+  float                     waterVerts[8];          //!< coords of the 4 vertexes of the water quad
+  float                     xWidth, zWidth;         //!< size of the water quad
+  float                     waterAngle;             //!< defines how much the water will be turned around the point waterPos
 
   // values for texture size, scale, texture coords
-  float               move;
-  float               move2;
-  float               waterUV;                //!< size of the waves
-  float               waterFlow;              //!< speed of the water
-  float               normalUV;
-  float               kNormalMapScale;
-  int                 textureSize;            //!< height and width of the texture
+  float                     move;
+  float                     move2;
+  float                     waterUV;                //!< size of the waves
+  float                     waterFlow;              //!< speed of the water
+  float                     normalUV;
+  float                     kNormalMapScale;
+  int                       textureSize;            //!< height and width of the texture
 
   // values for the uniforms
-  Vector              waterColor;             //!< color of the water
-  Vector              lightPos;               //!< position of the light that is used to render the reflection
-  float               shineSize;              //!< the bigger the value, the smaller the specular reflection point
-  float               shineStrength;
-  float               reflStrength;
-  float               refraction;
+  Vector                    waterColor;             //!< color of the water
+  Vector                    lightPos;               //!< position of the light that is used to render the reflection
+  float                     shineSize;              //!< the bigger the value, the smaller the specular reflection point
+  float                     shineStrength;
+  float                     reflStrength;
+  float                     refraction;
 
   // uniforms
-  Shader::Uniform*    cam_uni;                //!< uniform that is used for the camera position
-  Shader::Uniform*    light_uni;              //!< uniform that is used for the light position
-  Shader::Uniform*    color_uni;              //!< uniform that is used for the watercolor
-  Shader::Uniform*    shineSize_uni;          //!< uniform that is used for the specular shininessd of the water
-  Shader::Uniform*    shineStrength_uni;      //!< uniform that is used for the strenght of the specular reflection
-  Shader::Uniform*    reflStrength_uni;       //!< uniform that is used for the strength of the reflection
-  Shader::Uniform*    refr_uni;               //!< uniform that is used for the strength of the refraction
+  Shader::Uniform*          cam_uni;                //!< uniform that is used for the camera position
+  Shader::Uniform*          light_uni;              //!< uniform that is used for the light position
+  Shader::Uniform*          color_uni;              //!< uniform that is used for the watercolor
+  Shader::Uniform*          shineSize_uni;          //!< uniform that is used for the specular shininessd of the water
+  Shader::Uniform*          shineStrength_uni;      //!< uniform that is used for the strenght of the specular reflection
+  Shader::Uniform*          reflStrength_uni;       //!< uniform that is used for the strength of the reflection
+  Shader::Uniform*          refr_uni;               //!< uniform that is used for the strength of the refraction
 
   // 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;
+  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;
+  tAnimation<MappedWater>*  waterHeightFader;
+  float                     newWaterHeight;
+  float                     waterHeightFadeTime;
+  bool                      bFadeWaterHeight;
 
   int tempcounter;
