Index: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc	(revision 11417)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc	(revision 11421)
@@ -24,6 +24,4 @@
 		//RegisterObject(DialogueManager);
 		
-		
-
 	}
 	
@@ -35,5 +33,11 @@
 
 	void DialogueManager::registerquestion(NextQuestion* nq){
+		if(allQuestions.size()==0) {
+			orxout(internal_info) << "At least one NextQuestion has to be set." << endl;
+		} else  {
+			currentQuestion = allQuestions[0];
+		}
 		allQuestions.push_back(nq);
+			orxout(internal_info) << "qsize " << allQuestions.size();
 
 	}	
@@ -68,26 +72,34 @@
 		return a2;
 	}
-	bool DialogueManager::a1clicked(void){
-		orxout() << "a1 clicked" << endl;
+	void DialogueManager::a1clicked(void){
+		
+		assert((currentQuestion->retposQues())[0]);
+		orxout() << "a14 clicked" << endl;
+		orxout() << currentQuestion->possibleQuestions[0] << endl;
 		currentQuestion = currentQuestion->possibleQuestions[0];
-		return true;
+		update(currentQuestion);
+
+		
 	}
-	bool DialogueManager::a2clicked(void){
+	void DialogueManager::a2clicked(void){
 		orxout() << "a2 clicked" << endl;
-		return true;
+		
 	}
-	/*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(DialogueManager, XMLPort, xmlelement, mode);
-
-        XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode);
-    }*/
+	 void DialogueManager::update(NextQuestion* nq){
+	 	this->setquestion(nq->getquestion());
+	 	this->setanswers1(nq->getanswers1());
+	 	this->setanswers2(nq->getanswers2());
+	 }
 
 	
 
-	/*std::string DialogueManager::setnpc(std::string npc){
-		return npc;
+	
+
+	/*
+	
+	bool DialogueManager::theEnd(){
+	if(currentQuestion->retposQues()) return true;
+	else return false;
 	}
-
 	
 
Index: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h	(revision 11417)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h	(revision 11421)
@@ -46,19 +46,9 @@
 		std::string getanswers1(void); //tolua_export
 		std::string getanswers2(void); //tolua_export
-		bool a1clicked(void); //tolua_export
-		bool a2clicked(void); //tolua_export
-			/*std::string setnpc(std::string npc);
+		void a1clicked(void); //tolua_export
+		void a2clicked(void); //tolua_export
+			//bool theEnd(); 
+		void update(NextQuestion* nq);
 
-			void setanswers(std::string option1, std::string option2, std::string option3);
-			std::vector <std::string> getanswers(void);
-
-			int getnumOptions();
-			
-
-			
-			std::string npc;
-			std::vector<std::string> options;
-		
-*/
 private:
 	NextQuestion* currentQuestion;
Index: code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc	(revision 11417)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc	(revision 11421)
@@ -48,5 +48,6 @@
             i--;
         }
-        return nullptr; }
+        return nullptr;
+         }
 	
 	//XML and Event stuff
@@ -112,14 +113,14 @@
 	}
 
+	std::vector<NextQuestion*> NextQuestion::retposQues(){
+		orxout() << "fish" << endl;
+		assert(possibleQuestions[0]);
+		orxout() << possibleQuestions.size() << endl;
+		return possibleQuestions;
+	}
 
-	/*NextQuestion NextQuestion::compare(){
-		DialogueManager& m = DialogueManager::getInstance();
-		if(m.a1clicked()){
-			return *possibleQuestions[0];
-		}
 
-		else if(m.a2clicked()){
-			return *possibleQuestions[1];
-		}
+	/*
+
 	}*/
 
Index: code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h	(revision 11417)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h	(revision 11421)
@@ -10,6 +10,4 @@
 #include "core/EventIncludes.h"
 #include "DialoguePrereqs.h"
-
-
 
 
@@ -47,4 +45,5 @@
 
 		std::vector<NextQuestion*> possibleQuestions;
+		std::vector<NextQuestion*> retposQues();
 	private:
 		std::string a1;
