Index: /trunk/src/lib/gui/gl/Makefile.am
===================================================================
--- /trunk/src/lib/gui/gl/Makefile.am	(revision 10373)
+++ /trunk/src/lib/gui/gl/Makefile.am	(revision 10374)
@@ -25,4 +25,5 @@
 		glgui_frame.cc \
 		glgui_text.cc \
+		glgui_multiline_text.cc \
 		glgui_inputline.cc \
 		glgui_textfield.cc \
@@ -53,4 +54,5 @@
 		glgui_frame.h \
 		glgui_text.h \
+		glgui_multiline_text.h \
 		glgui_inputline.h \
 		glgui_textfield.h \
Index: /trunk/src/lib/gui/gl/glgui_multiline_text.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_multiline_text.cc	(revision 10374)
+++ /trunk/src/lib/gui/gl/glgui_multiline_text.cc	(revision 10374)
@@ -0,0 +1,180 @@
+/*
+   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: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
+
+#include "glgui_multiline_text.h"
+
+#include "text.h"
+
+namespace OrxGui
+{
+  ObjectListDefinition(GLGuiMultiLineText);
+  /**
+   * standard constructor
+  */
+  GLGuiMultiLineText::GLGuiMultiLineText ()
+  {
+    this->init();
+
+  }
+
+
+  /**
+   * standard deconstructor
+  */
+  GLGuiMultiLineText::~GLGuiMultiLineText()
+  {}
+
+  /**
+   * initializes the GUI-element
+   */
+  void GLGuiMultiLineText::init()
+  {
+    this->registerObject(this, GLGuiMultiLineText::_objectList);
+
+    this->_text.setParent2D(this);
+    this->_text.setRelCoor2D(4,4);
+    this->_text.setFont("fonts/final_frontier.ttf", 20);
+    this->_text.setLineWidth(400);
+//     this->_text.setDotsPosition(LimitedWidthText::Begin);
+    this->_text.setColor(foregroundColor());
+    this->_text.setVisibility(false);
+    this->_changedTextColor = Color::white;
+    this->resize();
+  }
+
+  /**
+  * @brief sets the Text of the Text
+  * @param text The new Text.
+   */
+  void GLGuiMultiLineText::setText(const std::string& text)
+  {
+    this->_text.setText(text);
+    this->changedText();
+  }
+
+  /**
+   * @brief appends text to the Text
+   * @param appendText the Text to append
+   */
+  void GLGuiMultiLineText::append(const std::string& appendText)
+  {
+    this->_text.append(appendText);
+    this->changedText();
+  }
+
+
+  /**
+   * @brief appends a Character to the Text
+   * @param character the Character to append.
+   */
+  void GLGuiMultiLineText::appendCharacter(char character)
+  {
+    this->_text.appendCharacter(character);
+    this->changedText();
+  }
+
+
+  /**
+   * @brief Removes Characters from the Text
+   * @param chars The count of characters to remove
+   */
+  void GLGuiMultiLineText::removeCharacters(unsigned int chars)
+  {
+    this->_text.removeCharacters(chars);
+    this->changedText();
+  }
+
+  void GLGuiMultiLineText::clear()
+  {
+    this->_text.clear();
+    this->resize();
+  }
+
+
+  /**
+  * @brief If the Text has been changed this function is called.
+  *
+  * This Function also emits the Signal textChanged.
+   */
+  void GLGuiMultiLineText::changedText()
+  {
+    this->resize();
+    this->setFrontColor(_changedTextColor, true);
+    this->textChanged.emit(this->_text.text());
+  }
+
+  void GLGuiMultiLineText::setTextSize(float size)
+  {
+    this->_text.setSize(size);
+    this->changedText();
+  }
+
+  void GLGuiMultiLineText::setFont(const Font& font)
+  {
+    GLGuiWidget::setFont(font);
+    this->_text.setFont(font);
+  }
+
+  void GLGuiMultiLineText::setChangedTextColor(const Color& color)
+  {
+    this->_changedTextColor = color;
+  }
+
+  /**
+   * @brief Resizes the Widget to the new Size-constraints.
+   */
+  void GLGuiMultiLineText::resize()
+  {
+    this->_text.setRelCoor2D(borderLeft(), borderTop());
+    this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));
+    //this->_text.setLineWidth(this->size2D);
+    GLGuiWidget::resize();
+    /*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
+  }
+
+  void GLGuiMultiLineText::updateFrontColor()
+  {
+    this->_text.setColor(foregroundColor());
+  }
+
+  void GLGuiMultiLineText::hiding()
+  {
+    this->_text.setVisibility(false);
+  }
+
+  void GLGuiMultiLineText::showing()
+  {
+    this->_text.setVisibility(true);
+  }
+
+
+
+  /**
+   * draws the GLGuiMultiLineText
+   */
+  void GLGuiMultiLineText::draw() const
+  {
+    this->beginDraw();
+    GLGuiWidget::draw();
+
+    //     this->frontMaterial().select();
+    //     GLGuiWidget::drawRect(this->frontRect());
+
+    this->endDraw();
+  }
+}
Index: /trunk/src/lib/gui/gl/glgui_multiline_text.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_multiline_text.h	(revision 10374)
+++ /trunk/src/lib/gui/gl/glgui_multiline_text.h	(revision 10374)
@@ -0,0 +1,65 @@
+/*!
+ * @file glgui_multiline_text.h
+ * The gl_TEXT widget of th openglGUI
+ *
+ */
+
+#ifndef _GLGUI_MULTILINE_TEXT_H
+#define _GLGUI_MULTILINE_TEXT_H
+
+#include "glgui_widget.h"
+#include "multi_line_text.h"
+// FORWARD DECLARATION
+namespace OrxGui
+{
+
+  //! This is part of the openglGUI class
+  /**
+   *
+   */
+  class GLGuiMultiLineText : public GLGuiWidget
+  {
+    ObjectListDeclaration(GLGuiMultiLineText);
+  public:
+    GLGuiMultiLineText();
+    virtual ~GLGuiMultiLineText();
+
+    void setText(const std::string& text);
+    void append(const std::string& appendText);
+    void appendCharacter(char character);
+    void removeCharacters(unsigned int chars);
+    void clear();
+
+    void setTextSize(float size);
+    virtual void setFont(const Font& font);
+    void setChangedTextColor(const Color& color);
+
+    void setLineWidth(float lineWidth) { this->_text.setLineWidth(lineWidth); };
+//    void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); };
+
+    const std::string& text() const { return _text.text(); };
+
+
+    virtual void draw() const;
+
+    sigslot::signal1<const std::string&> textChanged;
+
+  protected:
+    virtual void updateFrontColor();
+    virtual void hiding();
+    virtual void showing();
+    virtual void resize();
+
+  private:
+    void init();
+    void changedText();
+
+
+  private:
+    MultiLineText       _text;
+
+    Color               _changedTextColor;
+  };
+}
+
+#endif /* _GLGUI_MULTILINE_TEXT_H */
Index: /trunk/src/lib/gui/gl/glgui_text.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_text.cc	(revision 10373)
+++ /trunk/src/lib/gui/gl/glgui_text.cc	(revision 10374)
@@ -50,5 +50,5 @@
     this->_text.setFont("fonts/final_frontier.ttf", 20);
     this->_text.setLineWidth(400);
-    this->_text.setDotsPosition(LimitedWidthText::Begin);
+//     this->_text.setDotsPosition(LimitedWidthText::Begin);
     this->_text.setColor(foregroundColor());
     this->_text.setVisibility(false);
Index: /trunk/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_widget.cc	(revision 10373)
+++ /trunk/src/lib/gui/gl/glgui_widget.cc	(revision 10374)
@@ -112,10 +112,12 @@
 
 
-    this->setBackgroundColor(Color(.51, .3, .3, .5));
-    this->setBackgroundColor(Color(.3, .5, .3, 1), OrxGui::Selected);
-    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->setBackgroundColor(Color(0, 0, 0, 0));
+    this->setBackgroundColor(Color(0, 0, 0, 0), OrxGui::Selected);
+
+
+    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
 
     this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal);
@@ -563,4 +565,9 @@
   }
 
+  
+  
+  
+  
+  
   /**
   * @brief sets the Background Texture to all States.
@@ -569,9 +576,26 @@
   void GLGuiWidget::setBackgroundTexture(const std::string& textureName)
   {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) {
       _style[i]._background.setDiffuseMap(textureName);
+      _style[i]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+    }
     this->_currentStyle._background.setDiffuseMap(textureName);
-  }
-
+    this->_currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+  }
+
+  void GLGuiWidget::setBackgroundTexture(const std::string& textureName, OrxGui::State state)
+  {
+    _style[state]._background.setDiffuseMap(textureName);
+    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+
+    if (state == _state) {
+      _currentStyle._background.setDiffuseMap(textureName);
+      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+    }
+  }
+  
+  
+  
+  
   /**
    * @brief sets the Background Texture.
@@ -582,6 +606,10 @@
   {
     _style[state]._background.setDiffuseMap(texture);
-    if (state == _state)
+    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+
+    if (state == _state) {
       _currentStyle._background.setDiffuseMap(texture);
+      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
+    }
   }
 
Index: /trunk/src/lib/gui/gl/glgui_widget.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_widget.h	(revision 10373)
+++ /trunk/src/lib/gui/gl/glgui_widget.h	(revision 10374)
@@ -181,4 +181,5 @@
     void setBackgroundTexture(const std::string& textureName);
     void setBackgroundTexture(const Texture& texture, OrxGui::State state);
+    void setBackgroundTexture(const std::string& textureName, OrxGui::State state);
     void setBackgroundTexture(const std::string& textureName, const std::string& stateName);
 
Index: /trunk/src/world_entities/WorldEntities.am
===================================================================
--- /trunk/src/world_entities/WorldEntities.am	(revision 10373)
+++ /trunk/src/world_entities/WorldEntities.am	(revision 10374)
@@ -28,4 +28,7 @@
                 world_entities/mount_point.cc \
                 world_entities/sound_entity.cc \
+                \
+                world_entities/questGUI/quest_gui.cc \
+		world_entities/questGUI/quest.cc \
                 \
                 world_entities/weapons/test_gun.cc \
@@ -153,4 +156,7 @@
                 sound_entity.h \
                 \
+                questGUI/quest_gui.h \
+		questGUI/quest.h \
+                \
                 weapons/test_gun.h \
                 weapons/laser_cannon.cc \
Index: /trunk/src/world_entities/questGUI/quest.cc
===================================================================
--- /trunk/src/world_entities/questGUI/quest.cc	(revision 10374)
+++ /trunk/src/world_entities/questGUI/quest.cc	(revision 10374)
@@ -0,0 +1,109 @@
+
+
+/*
+   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: Andreas Hejj
+
+*/
+
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "debug.h"
+#include "quest.h"
+
+#include "event_handler.h"
+
+#include "state.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "graphics_engine.h"
+#include "camera.h"
+#include "sound_engine.h"
+
+#include "sound_source.h"
+
+#include "glgui.h"
+#include "menu/glgui_imagebutton.h"
+#include "glgui_multiline_text.h"
+#include <glgui_image.h>
+
+
+#include "shell_command.h"
+
+
+
+
+ObjectListDefinition(Quest);
+
+Quest::Quest(const TiXmlElement* root)
+{
+  this->registerObject(this, Quest::_objectList);
+  
+  this->Status = false;
+
+  if( root != NULL)
+    this->loadParams(root);
+
+}
+
+
+/**
+ * deconstructor
+ */
+Quest::~Quest () 
+{
+}
+
+
+
+
+/**
+ * loads the xml tagsthis->questDescription
+ * @param root: root xml tag for this element
+ */
+ 
+void Quest::loadParams(const TiXmlElement* root)
+{
+   LoadParam(root, "quest-name", this, Quest, setQuestName)
+       .describe("sets the name of a quest");
+   LoadParam(root, "quest-description", this, Quest, setQuestDescription)
+       .describe("sets the description of a quest");
+   LoadParam(root, "quest-picture", this, Quest, setQuestPicture)
+       .describe("sets the picture of a quest");
+   LoadParam(root, "quest-difficulty", this, Quest, setQuestDifficulty)
+       .describe("sets the difficulty of a quest");
+   LoadParam(root, "quest-persons", this, Quest, setQuestPersons)
+       .describe("sets the number of persons needed for a quest");
+   LoadParam(root, "reward-description", this, Quest, setRewardDescription)
+       .describe("sets the description of a reward");
+   LoadParam(root, "reward-picture", this, Quest, setRewardPicture)
+       .describe("sets the Picture of a reward");
+   
+}
+
+void Quest::setQuestActive()
+{
+  this->Status = true;
+}
+
+void Quest::setQuestInactive()
+{
+  this->Status = false;
+}
+
+const bool Quest::getQuestStatus()
+{
+  return this->Status;
+}
Index: /trunk/src/world_entities/questGUI/quest.h
===================================================================
--- /trunk/src/world_entities/questGUI/quest.h	(revision 10374)
+++ /trunk/src/world_entities/questGUI/quest.h	(revision 10374)
@@ -0,0 +1,56 @@
+
+#ifndef _QUEST_H
+#define _QUEST_H
+
+
+
+#include "base_object.h"
+#include <string>
+
+class Quest : public BaseObject 
+{
+
+  ObjectListDeclaration(Quest);
+  
+  public:
+   Quest (const TiXmlElement* root);
+   virtual ~Quest ();
+
+
+   virtual void loadParams(const TiXmlElement* root = NULL);
+   
+   inline void setQuestName(const std::string& questName)                { this->questName = questName; }
+   inline const std::string& getQuestName()                              { return this->questName; }
+   inline void setQuestDescription(const std::string& questDescription)  { this->questDescription = questDescription; }
+   inline const std::string& getQuestDescription()                       { return this->questDescription; }
+   inline void setQuestPicture(const std::string& questPicture)          { this->questPicture = questPicture; }
+   inline const std::string& getQuestPicture()                           { return this->questPicture; }
+   inline void setQuestDifficulty(const std::string& questDifficulty)    { this->questDifficulty = questDifficulty; }
+   inline const std::string& getQuestDifficulty()                        { return this->questDifficulty; }
+   
+   inline void setQuestPersons(const std::string& questPersons)          { this->questPersons = questPersons; }
+   inline const std::string& getQuestPersons()                        { return this->questPersons; }
+   
+   inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription  = rewardDescription; }
+   inline const std::string& getRewardDescription()                      { return this->rewardDescription; }
+   inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
+   inline const std::string& getRewardPicture()                          { return this->rewardPicture; }
+   void setQuestActive();
+   void setQuestInactive();
+   const bool getQuestStatus();
+   
+
+   
+  private:
+    bool                    Status;
+    std::string             questName;
+    std::string             questDescription;
+    std::string             questPersons;
+    std::string             questPicture;
+    std::string             questDifficulty;
+    std::string             rewardDescription;
+    std::string             rewardPicture;
+
+};
+
+#endif /* _QUEST_H */
Index: /trunk/src/world_entities/questGUI/quest_gui.cc
===================================================================
--- /trunk/src/world_entities/questGUI/quest_gui.cc	(revision 10374)
+++ /trunk/src/world_entities/questGUI/quest_gui.cc	(revision 10374)
@@ -0,0 +1,280 @@
+
+
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 1004 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    std::string             questName;
+    std::string             questDescription;
+    std::string             questPicture;
+    std::string             questDifficulty;
+    std::string             rewardDescription;
+    std::string             rewardPicture;: Andreas Hejj
+
+*/
+
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "debug.h"
+#include "quest_gui.h"
+
+#include "event_handler.h"
+
+#include "state.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "graphics_engine.h"
+#include "camera.h"
+#include "sound_engine.h"
+
+#include "sound_source.h"
+
+#include "glgui_widget.h"
+#include "glgui.h"
+#include "menu/glgui_imagebutton.h"
+#include "glgui_multiline_text.h"
+#include <glgui_image.h>
+
+
+#include "quest.h"
+
+#include "shell_command.h"
+
+ObjectListDefinition(QuestGUI);
+
+CREATE_FACTORY(QuestGUI);
+SHELL_COMMAND(gui, QuestGUI, guiInit);
+
+
+#include "script_class.h"
+CREATE_SCRIPTABLE_CLASS(QuestGUI,
+                        addMethod("guiInit", Executor0<QuestGUI, lua_State*>(&QuestGUI::guiInit))
+                        ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
+                       );
+
+
+
+QuestGUI::QuestGUI(const TiXmlElement* root)
+{
+  if (root != NULL)
+  {
+  this->registerObject(this, QuestGUI::_objectList);
+
+  this->toList(OM_GROUP_00);
+
+  this->questBox = NULL;
+
+  this->bKillGui = false;
+  
+  this->bActive = false;
+
+  this->myQuest = new Quest(root);
+  if(root)
+    this->loadParams( root);
+  }
+}
+
+
+/**
+ * deconstructor
+ */
+QuestGUI::~QuestGUI ()
+{
+  if( this->myQuest)
+    delete this->myQuest;
+}
+
+/**
+ * loads the xml tagsthis->questDescription
+ * @param root: root xml tag for this element
+ */
+void QuestGUI::loadParams(const TiXmlElement* root)
+{
+  WorldEntity::loadParams(root);
+}
+
+
+
+/**
+ * initializes the gui
+ */
+void QuestGUI::guiInit()
+{
+  if (questBox == NULL)
+  {
+    this->questBox= new OrxGui::GLGuiBox(OrxGui::Vertical);
+    questBox->setBorderTop(10);
+    questBox->setBorderRight(10);
+    questBox->setBorderLeft(10);
+    questBox->setBorderBottom(10);
+    this->questBox->setBackgroundTexture("maps/rand.png");
+    this->bKillGui = false;
+
+    OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+    {
+      headerBox->setBackgroundTexture("maps/rand-unten.png");
+      OrxGui::GLGuiImage* questImage = new OrxGui::GLGuiImage();
+      questImage->setWidgetSize(100, 100);
+      questImage->loadImageFromFile(this->myQuest->getQuestPicture());
+      questImage->show();
+      headerBox->pack(questImage);
+
+      OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
+      {      
+        OrxGui::GLGuiMultiLineText* questDetails = new OrxGui::GLGuiMultiLineText();
+        questDetails->setText(this->myQuest->getQuestDifficulty());
+        questDetails->append(this->myQuest->getQuestPersons());
+        outlineBox->setBorderTop(0);
+        outlineBox->setBorderRight(0);
+        outlineBox->setBorderLeft(0);
+        outlineBox->setBorderBottom(10);
+        outlineBox->pack(questDetails);
+      }
+      headerBox->setBorderTop(0);
+      headerBox->setBorderRight(0);
+      headerBox->setBorderLeft(0);
+      headerBox->setBorderBottom(10);
+      headerBox->pack(outlineBox);
+    }
+
+    OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+    {
+      labelBox->setBackgroundTexture("maps/rand-unten.png");
+      OrxGui::GLGuiMultiLineText* questTxt = new OrxGui::GLGuiMultiLineText();
+      questTxt->setText(this->myQuest->getQuestDescription());
+      labelBox->pack(questTxt);
+      
+      OrxGui::GLGuiImage* placeImage = new OrxGui::GLGuiImage();
+      placeImage->setWidgetSize(85, 10);
+      placeImage->loadImageFromFile("maps/schwarz.png");
+      placeImage->show();
+      labelBox->pack(placeImage);
+      
+      
+      labelBox->setBorderTop(0);
+      labelBox->setBorderRight(0);
+      labelBox->setBorderLeft(55);
+      labelBox->setBorderBottom(10);
+    }
+
+
+    OrxGui::GLGuiBox* rewardBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+    {
+      rewardBox->setBackgroundTexture("maps/rand-unten.png");
+      OrxGui::GLGuiImage* rewardImage = new OrxGui::GLGuiImage();
+      rewardImage->setWidgetSize(100, 100);
+      rewardImage->loadImageFromFile(this->myQuest->getRewardPicture());
+      rewardImage->show();
+      rewardBox->pack(rewardImage);
+
+      OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText();
+      rewardTxt->setText(this->myQuest->getRewardDescription());
+      rewardBox->setBorderTop(0);
+      rewardBox->setBorderRight(0);
+      rewardBox->setBorderLeft(0);
+      rewardBox->setBorderBottom(10);
+      rewardBox->pack(rewardTxt);
+    }
+
+    OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+    {
+      OrxGui::GLGuiImage* placeImage = new OrxGui::GLGuiImage();
+      placeImage->setWidgetSize(20, 10);
+      placeImage->loadImageFromFile("maps/schwarz.png");
+      placeImage->show();
+      answerBox->pack(placeImage);
+      
+      OrxGui::GLGuiBox* acceptBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        //acceptBox->setBackgroundTexture("maps/accept.png");
+        acceptBox->setBackgroundTexture("maps/accept.png", OrxGui::Normal);
+        acceptBox->setBackgroundTexture("maps/acceptrout.png", OrxGui::Selected);
+        OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("        ");
+        acceptButton->released.connect(this, &QuestGUI::accept);
+        acceptBox->setBorderTop(7);
+        acceptBox->setBorderRight(7);
+        acceptBox->setBorderLeft(7);
+        acceptBox->setBorderBottom(7);
+        acceptBox->pack(acceptButton);
+      }
+      answerBox->pack(acceptBox);
+      
+      OrxGui::GLGuiImage* placeImage2 = new OrxGui::GLGuiImage();
+      placeImage2->setWidgetSize(300, 10);
+      placeImage2->loadImageFromFile("maps/schwarz.png");
+      placeImage2->show();
+      answerBox->pack(placeImage2);
+      
+      OrxGui::GLGuiBox* refuseBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+      {
+        refuseBox->setBackgroundTexture("maps/refuserout.png");
+        OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("        ");
+        refuseButton->released.connect(this, &QuestGUI::refuse);
+        refuseBox->setBorderTop(7);
+        refuseBox->setBorderRight(7);
+        refuseBox->setBorderLeft(7);
+        refuseBox->setBorderBottom(7);
+        refuseBox->pack(refuseButton);
+      }
+      answerBox->setBorderTop(15);
+      answerBox->setBorderRight(0);
+      answerBox->setBorderLeft(0);
+      answerBox->setBorderBottom(20);
+      answerBox->pack(refuseBox);
+    }
+    this->questBox->pack(headerBox);
+    this->questBox->pack(labelBox);
+    this->questBox->pack(rewardBox);
+    this->questBox->pack(answerBox);
+    this->questBox->showAll();
+
+    this->questBox->setAbsCoor2D(300, 100);
+    OrxGui::GLGuiHandler::getInstance()->activate();
+    OrxGui::GLGuiHandler::getInstance()->activateCursor();
+  }
+  else
+  {
+    this->bKillGui = true;
+  }
+
+}
+
+
+void QuestGUI::tick(float dt)
+{
+  if( this->bKillGui)
+    this->killgui();
+}
+
+
+void QuestGUI::accept()
+{
+  this->myQuest->setQuestActive();
+  this->bKillGui = true;
+  bActive=true;
+}
+
+void QuestGUI::refuse()
+{
+  this->bKillGui = true;
+  bActive=false;
+}
+
+void QuestGUI::killgui()
+{
+  OrxGui::GLGuiHandler::getInstance()->deactivate();
+  OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
+  delete this->questBox;
+  this->questBox = NULL;
+  this->bKillGui = false;
+}
Index: /trunk/src/world_entities/questGUI/quest_gui.h
===================================================================
--- /trunk/src/world_entities/questGUI/quest_gui.h	(revision 10374)
+++ /trunk/src/world_entities/questGUI/quest_gui.h	(revision 10374)
@@ -0,0 +1,53 @@
+
+#ifndef _QUESTGUI_H
+#define _QUESTGUI_H
+
+#include "world_entity.h"
+#include "glgui.h"
+#include <glgui_image.h>
+#include <vector>
+
+class Quest;
+
+class QuestGUI : public WorldEntity 
+{
+
+  ObjectListDeclaration(QuestGUI);
+  
+  public:
+   QuestGUI (const TiXmlElement* root = NULL);
+   virtual ~QuestGUI ();
+                     
+   void loadParams(const TiXmlElement* root);
+   bool isActive(){ return this->bActive; }
+   void guiInit();
+
+   virtual void tick(float dt);
+   
+  private:
+    Quest*                  myQuest;
+    bool                    bKillGui;
+    bool                    bActive;
+    
+    OrxGui::GLGuiBox*       headerBox;
+    OrxGui::GLGuiBox*       outlineBox; 
+    OrxGui::GLGuiBox*       labelBox;
+    OrxGui::GLGuiImage*     placeImage;
+    OrxGui::GLGuiBox*       questBox;
+    OrxGui::GLGuiImage*     questImage;
+    OrxGui::GLGuiBox*       rewardBox;
+    OrxGui::GLGuiImage*     rewardImage;
+    OrxGui::GLGuiBox*       answerBox;
+    OrxGui::GLGuiImage*     placeImage2;
+    OrxGui::GLGuiBox*       acceptBox;
+    OrxGui::GLGuiBox*       refuseBox;
+
+
+    OrxSound::SoundSource*  selectorSource;
+    
+    void accept();
+    void refuse();
+    void killgui();
+};
+
+#endif /* _QUESTGUI_H */
Index: /trunk/src/world_entities/script_trigger.cc
===================================================================
--- /trunk/src/world_entities/script_trigger.cc	(revision 10373)
+++ /trunk/src/world_entities/script_trigger.cc	(revision 10374)
@@ -181,5 +181,5 @@
    }
 
-  if(triggerRemains && scriptCalled)
+ if(triggerRemains && scriptCalled)
   {
     executeAction(timestep);
@@ -190,20 +190,18 @@
   {
     if( !invert && this->distance(target) < radius)
+    {
+    //printf("Distance is %f \n", this->distance(target));
+    executeAction(timestep);
+    scriptCalled = true;
+    return;
+
+    }
+    else if( invert && this->distance(target) > radius)
     {
       executeAction(timestep);
       scriptCalled = true;
       return;
-
-    }
-    else if( invert && this->distance(target) > radius)
-    {
-      executeAction(timestep);
-      scriptCalled = true;
-      return;
-    }
-  }
- //else
-   //printf("SCRIPTTRIGGER: target out of range\n");
-
+    }
+  }
 }
 
@@ -211,5 +209,4 @@
 void ScriptTrigger::executeAction(float timestep)
 {
-
   if(scriptIsOk)
   {
