Index: branches/gui/src/world_entities/questGUI/quest_gui.cc
===================================================================
--- branches/gui/src/world_entities/questGUI/quest_gui.cc	(revision 10069)
+++ branches/gui/src/world_entities/questGUI/quest_gui.cc	(revision 10129)
@@ -12,5 +12,10 @@
 
    ### File Specific:
-   main-programmer: Andreas Hejj
+   main-programmer    std::string             questName;
+    std::string             questDescription;
+    std::string             questPicture;
+    std::string             questDifficulty;
+    std::string             rewardDescription;
+    std::string             rewardPicture;: Andreas Hejj
 
 */
@@ -35,4 +40,5 @@
 #include "sound_source.h"
 
+#include "glgui_widget.h"
 #include "glgui.h"
 #include "menu/glgui_imagebutton.h"
@@ -41,4 +47,6 @@
 
 
+#include "quest.h"
+
 #include "shell_command.h"
 
@@ -60,7 +68,10 @@
   
   this->questBox = NULL;  
-
-  if( root != NULL)
-    this->loadParams(root);
+  
+  this->bKillGui = false;
+
+  this->myQuest = new Quest(root);
+  if(root)
+    this->loadParams( root);
 
 }
@@ -72,8 +83,7 @@
 QuestGUI::~QuestGUI () 
 {
-}
-
-
-
+  if( this->myQuest)
+    delete this->myQuest;
+}
 
 /**
@@ -83,20 +93,7 @@
 void QuestGUI::loadParams(const TiXmlElement* root)
 {
-   WorldEntity::loadParams(root);
-   
-   LoadParam(root, "quest-name", this, QuestGUI, setQuestName)
-       .describe("sets the name of a quest");
-   LoadParam(root, "quest-description", this, QuestGUI, setQuestDescription)
-       .describe("sets the description of a quest");
-   LoadParam(root, "quest-picture", this, QuestGUI, setQuestPicture)
-       .describe("sets the picture of a quest");
-   LoadParam(root, "quest-difficulty", this, QuestGUI, setQuestDifficulty)
-       .describe("sets the difficulty of a quest");
-   LoadParam(root, "reward-description", this, QuestGUI, setRewardDescription)
-       .describe("sets the description of a reward");
-   LoadParam(root, "reward-picture", this, QuestGUI, setRewardPicture)
-       .describe("sets the Picture of a reward");
-   
-}
+  WorldEntity::loadParams(root);
+}
+
 
 
@@ -109,4 +106,5 @@
   {
     this->questBox= new OrxGui::GLGuiBox(OrxGui::Vertical);
+    this->bKillGui = false;
     
     OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
@@ -114,15 +112,18 @@
       OrxGui::GLGuiImage* questImage = new OrxGui::GLGuiImage();
       questImage->setWidgetSize(100, 100);
-      questImage->loadImageFromFile(questPicture);
+      questImage->loadImageFromFile(this->myQuest->getQuestPicture());
       questImage->show();
+      questImage->setBorderBottom(20);
       headerBox->pack(questImage);
+      headerBox->setBorderBottom(20);
       
       OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
       {
         OrxGui::GLGuiText* questDifficulty = new OrxGui::GLGuiText();
-        questDifficulty->setText(this->questDifficulty);
+        questDifficulty->setText(this->myQuest->getQuestDifficulty());
         outlineBox->pack(questDifficulty);
       }
       headerBox->pack(outlineBox);
+      headerBox->setBorderBottom(75);
       
     }
@@ -131,6 +132,7 @@
     { 
       OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText();
-      questTxt->setText(this->questDescription);
+      questTxt->setText(this->myQuest->getQuestDescription());
       labelBox->pack(questTxt);
+      labelBox->setBorderBottom(75);
     }
     
@@ -140,11 +142,14 @@
       OrxGui::GLGuiImage* rewardImage = new OrxGui::GLGuiImage();
       rewardImage->setWidgetSize(50, 50);
-      rewardImage->loadImageFromFile(rewardPicture);
+      rewardImage->loadImageFromFile(this->myQuest->getRewardPicture());
       rewardImage->show();
       rewardBox->pack(rewardImage);
+      rewardImage->setBorderBottom(50);
     
       OrxGui::GLGuiText* rewardTxt = new OrxGui::GLGuiText();
-      rewardTxt->setText(this->rewardDescription);
+      rewardTxt->setText(this->myQuest->getRewardDescription());
       rewardBox->pack(rewardTxt);
+      rewardBox->setBorderBottom(75);
+      
     }
     
@@ -152,7 +157,10 @@
     {
       OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept");
+      acceptButton->released.connect(this, &QuestGUI::accept);
       answerBox->pack(acceptButton);
+      acceptButton->select();
       
       OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse");
+      refuseButton->released.connect(this, &QuestGUI::refuse);
       answerBox->pack(refuseButton);
     }
@@ -170,13 +178,33 @@
   else
   {
-    OrxGui::GLGuiHandler::getInstance()->deactivate();
-    OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
-    delete this->questBox;
-    this->questBox = NULL;
+    this->bKillGui = true;
   }
   
 }
 
-
-
-
+    
+void QuestGUI::tick(float dt)
+{
+  if( this->bKillGui)
+    this->killgui();
+}
+    
+
+void QuestGUI::accept()
+{
+  this->bKillGui = true;
+  
+}
+
+void QuestGUI::refuse()
+{
+  this->bKillGui = true;
+}
+
+void QuestGUI::killgui()
+{
+  OrxGui::GLGuiHandler::getInstance()->deactivate();
+  OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
+  delete this->questBox;
+  this->questBox = NULL;
+}
