Index: /code/branches/Presentation_HS17/data/gui/layouts/Dialog.layout
===================================================================
--- /code/branches/Presentation_HS17/data/gui/layouts/Dialog.layout	(revision 11682)
+++ /code/branches/Presentation_HS17/data/gui/layouts/Dialog.layout	(revision 11682)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="orxonox/Dialog/Background" > 
+    	<Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Options" >
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Person" >
+                <Property Name="Alpha" Value="0.8" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="LeftAligned" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="CentreAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.05,0},{0.25,0},{0.15,0}}" />
+            </Window>
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestionWrapper" >
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.05,0},{0.95,0},{0.45,0}}" />
+                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/QuestionPane" >
+                        <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
+                        <Property Name="HorzStepSize" Value="0.005" />
+                        <Property Name="VertStepSize" Value="0.005" />
+                        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                        <Property Name="HorzOverlapSize" Value="0.01" />
+                        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.997,0},{0.997,0}}" />
+                        <Property Name="VertOverlapSize" Value="0.01" />
+                        <Property Name="HorzScrollPosition" Value="0" />
+                        <Property Name="VertScrollPosition" Value="0" />
+                        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Question" >
+                            <Property Name="Alpha" Value="0.8" />
+                            <Property Name="InheritsAlpha" Value="False" />
+                            <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
+                            <Property Name="VertFormatting" Value="CentreAligned" />
+                            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+                        </Window>
+                </Window>
+            </Window>
+
+            <Window Type="MenuWidgets/Listbox" Name="orxonox/AnsListbox" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.5,0},{0.95,0},{0.85,0}}" />
+                <Event Name="ItemSelectionChanged" Function="Dialog.answer_changed" />
+            </Window>
+        
+            <Window Type="MenuWidgets/Button" Name="orxonox/SayButton" >
+                <Property Name="Text" Value="Say" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.9,0},{0.575,0},{0.975,0}}" />
+                <Event Name="Clicked" Function="Dialog.Button_clicked"/>
+            </Window>
+        </Window>
+         
+    </Window>
+</GUILayout>
Index: de/branches/Presentation_HS17/data/gui/layouts/Dialogue.layout
===================================================================
--- /code/branches/Presentation_HS17/data/gui/layouts/Dialogue.layout	(revision 11681)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<GUILayout >
-    <Window Type="DefaultWindow" Name="orxonox/Dialogue/Background" > 
-    	<Property Name="InheritsAlpha" Value="False" />
-        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
-        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialogue/Inventory" >
-            <Property Name="Alpha" Value="0.8" />
-            <Property Name="InheritsAlpha" Value="False" />
-            <Property Name="HorzFormatting" Value="HorzCentred" />
-            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="VertFormatting" Value="TopAligned" />
-            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
-            <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialogue/Wrapper" >
-                <Property Name="TextColours" Value="FF4444FF" />
-                <Property Name="InheritsAlpha" Value="False" />
-                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-                <Property Name="HorzFormatting" Value="HorzCentred" />
-                <Property Name="VertFormatting" Value="TopAligned" />
-                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
-            </Window>
-        </Window>
-         
-    </Window>
-</GUILayout>
Index: /code/branches/Presentation_HS17/data/gui/scripts/Dialog.lua
===================================================================
--- /code/branches/Presentation_HS17/data/gui/scripts/Dialog.lua	(revision 11682)
+++ /code/branches/Presentation_HS17/data/gui/scripts/Dialog.lua	(revision 11682)
@@ -0,0 +1,127 @@
+-- Dialog.lua
+
+local P = createMenuSheet("Dialog")
+
+P.wrapper = nil
+P.detailsWindows = {}
+P.showing = false
+P.choice = 0
+P.scrollbarWidth = 12
+
+function P.onLoad() --wird ausgefuert wenn Fenster geladen
+    P.wrapper = nil
+end
+
+function P.onShow() --wird ausgefuert wenn Dialogfenster gezeigt
+
+    orxonox.CommandExecutor:execute("setTimeFactor 0")
+    P.createDialog()
+    P.showing = true
+
+end
+
+function P.onHide() --aufgefuert wenn Fenster geschlossen wird
+    orxonox.CommandExecutor:execute("setTimeFactor 1")
+    P.showing = false
+    P.cleanup(true)
+end
+
+function P.createDialog() -- initiallisiert das Dialog Fenster, setzt Namen sowie die erste Frage mit enstprechenden Antworten
+
+    local manager = orxonox.DialogManager:getInstance()
+    
+    
+    local personfield = winMgr:getWindow("orxonox/Dialog/Person")
+    local person = manager:getPerson()
+    personfield:setText(person)
+
+    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfield:setText(question)
+
+    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    CEGUI.toListbox(listboxwindow):resetList()
+
+    local ansList = {}
+    local anssize = manager:getSize()
+
+    for index = 0, anssize -1, 1 do
+        table.insert(ansList, manager:getAnswer(index))
+    end  
+
+    for k,v in pairs(ansList) do
+        item = CEGUI.createListboxTextItem(v)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listboxwindow):addItem(item)
+    end
+end
+
+function P.updateDialog()   --updated den Dialog entsprechend der Ausgeaehlten option der letzten Frage, setzt Frage und Antwortmoeglichkeiten neu
+    local manager = orxonox.DialogManager:getInstance()
+    manager:update(P.choice)
+
+    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfield:setText(question)
+
+    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    listboxwindow:resetList()
+
+    local ansList = {}
+    local anssize = manager:getSize()
+
+    for index = 0, anssize -1, 1 do
+        table.insert(ansList, manager:getAnswer(index))
+    end  
+
+    for k,v in pairs(ansList) do
+        item = CEGUI.createListboxTextItem(v)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listboxwindow):addItem(item)
+    end
+
+    P.choice = 0
+end
+
+function P.answer_changed(e)    --wird aufgerufen falls Auswahl geaendert wird und setzt enstprechenden Indexparameter  
+    listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    selection = listboxwindow:getFirstSelectedItem()
+    if selection ~= nil then
+    P.choice = listboxwindow:getItemIndex(selection)
+    else 
+        P.choice = 0
+    end
+end
+
+
+function P.cleanup(destroyDetails)  --loest Fenster wieder auf (!nicht selbst geschrieben, nur uebernommen, eventuell nicht noetiger code)
+
+    if P.wrapper ~= nil then
+        winMgr:destroyWindow(P.wrapper)
+    end
+    
+    --Destroy details windows.
+    if destroyDetails == false then
+        return
+    end
+    for k,v in pairs(P.detailsWindows) do
+        if v ~= nil then
+            P.destroyDetailWindow(k)
+        end
+    end
+    
+end
+
+
+
+function P.Button_clicked(e)    --wird bei click auf say knopf ausgeloest, entscheidet ob Dialog schliesst oder updated und fuert entsprechen aus
+    local ending = orxonox.DialogManager:getInstance():endtest(P.choice)
+    
+    if ending then
+        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
+    else 
+        P.updateDialog(index)
+    end
+end
+
+return P
Index: de/branches/Presentation_HS17/data/gui/scripts/Dialogue.lua
===================================================================
--- /code/branches/Presentation_HS17/data/gui/scripts/Dialogue.lua	(revision 11681)
+++ 	(revision )
@@ -1,144 +1,0 @@
-
--- Dialogue.lua
-
-local P = createMenuSheet("Dialogue")
-
-P.wrapper = nil
-P.detailsWindows = {}
-P.detailPickups = {}
-P.pickupsList = {}
-
-P.showing = false
-
--- Design parameters
-P.imageHeight = 50
-P.detailImageSize = 100
-P.textHeight = 30
-P.buttonWidth = 85
-
-function P.onLoad()
-    P.wrapper = nil
-    P.detailsWindows = {}
-    P.detailPickups = {}
-    P.pickupsList = {}
-end
-
-function P.onShow()
-    orxonox.CommandExecutor:execute("setTimeFactor 0")
-    P.createInventory()
-    P.showing = true
-
-end
-
-function P.onHide()
-    orxonox.CommandExecutor:execute("setTimeFactor 1")
-    P.showing = false
-    P.cleanup(true)
-end
-
-function P.update()
-    P.updateInventory()
-    if P.showing == false then
-        return
-    end
-
-    -- Update opened detail windows.
-    
-
-    -- Update main inventory.
-    P.cleanup(false)
-    P.createInventory()
-    -- TODO: Recover scrolling position
-    
-end
-
-function P.createInventory()
-
-    local pickupManager = orxonox.DialogueManager:getInstance()
-    
-    root = winMgr:getWindow("orxonox/Dialogue/Inventory")
-    local question = orxonox.DialogueManager:getInstance():getquestion()
-    root:setText(question)
-    P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/Dialogue/Inventory/Wrapper")
-    P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
-    root:addChildWindow(P.wrapper)
-    
-    
-    detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
-    local a1 = orxonox.DialogueManager:getInstance():getanswers1()
-    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, (P.imageHeight-P.textHeight)/2)))
-    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight)))
-    detailsButton:setText(a1)
-    orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked")
-    P.wrapper:addChildWindow(detailsButton)
-
-    a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
-    local a2 = orxonox.DialogueManager:getInstance():getanswers2()
-    a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, (P.imageHeight-P.textHeight)/2)))
-    a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight)))
-    a2Button:setText(a2)
-    orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked")
-    P.wrapper:addChildWindow(a2Button)
-
-
-end
-
-function P.updateInventory()
-    local questionn = orxonox.DialogueManager:getInstance():getquestion()
-    root:setText(questionn)
-    local a1n = orxonox.DialogueManager:getInstance():getanswers1()
-    detailsButton:setText(a1n)
-    local a2n = orxonox.DialogueManager:getInstance():getanswers2()
-    a2Button:setText(a2n)
-
-end
-
-
-function P.cleanup(destroyDetails)
-    
-    if P.wrapper ~= nil then
-        winMgr:destroyWindow(P.wrapper)
-    end
-    
-    --Destroy details windows.
-    if destroyDetails == false then
-        return
-    end
-    for k,v in pairs(P.detailsWindows) do
-        if v ~= nil then
-            P.destroyDetailWindow(k)
-        end
-    end
-    
-end
-
-
-
-function P.a1Button_clicked(e)
-    local ending = orxonox.DialogueManager:getInstance():theEnd()
-    
-    if ending then
-        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue")
-    
-    
-    else 
-        orxonox.DialogueManager:getInstance():a1clicked()
-        P.update()
-    end
-end
-
-function P.a2Button_clicked(e)
-    local ending = orxonox.DialogueManager:getInstance():theEnd()
-    
-    if ending then
-        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue")
-    
-    
-    else 
-        orxonox.DialogueManager:getInstance():a2clicked()
-        P.update()
-    end
-    
-end
-
-return P
Index: /code/branches/Presentation_HS17/data/levels/DialogShowcase.oxw
===================================================================
--- /code/branches/Presentation_HS17/data/levels/DialogShowcase.oxw	(revision 11682)
+++ /code/branches/Presentation_HS17/data/levels/DialogShowcase.oxw	(revision 11682)
@@ -0,0 +1,131 @@
+<LevelInfo
+ name = "DialogShowase"
+ description = "A level to show and test the functionality of the Dialog module."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/HeavyCruiser.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipEscort.oxt")
+  include("templates/endurancetest_template.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+  
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+ <DistanceTrigger name="test" position="100,0,100" target="Pawn" distance=25 stayActive="true" />
+ <Backlight position="100,0,100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
+    
+    <Dialog name="Kurt" currentQuestionId="loop1">
+      <questions>
+        <Question Id="loop1" question="Wanna be looped?" >
+          <answerIds>
+            <AnswerId Id="yes"/>
+            <AnswerId Id="no"/>
+            <AnswerId Id="giveItToMe"/>
+          </answerIds>
+        </Question>
+        <Question Id="lorem" question="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." >
+          <answerIds>
+            <AnswerId Id="endIt"/>
+          </answerIds>
+        </Question>
+        <Question Id="loop2" question="Wanna be looped again?" >
+          <answerIds>
+            <AnswerId Id="yes"/>
+            <AnswerId Id="no"/>
+            <AnswerId Id="endIt"/>
+          </answerIds>
+        </Question>
+        <Question  Id="ok" question="Guess not then"/>
+      </questions>
+      <answers>
+        <Answer Id="giveItToMe" answer="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." nextQuestionId="lorem"/>
+        <Answer Id="yes" answer="yeah loop me" nextQuestionId="loop2"/>
+        <Answer Id="no" answer="i'd rather not" nextQuestionId="ok"/>
+        <Answer Id="endIt" answer="i will go now..." nextQuestionId="end"/>
+      </answers>
+      <events>
+        <execute>
+          <EventListener event="test"/>
+        </execute>
+      </events>
+    </Dialog>
+    
+
+
+
+  <DistanceTrigger name="troll" position="100,0,200" target="Pawn" distance=25 stayActive="true" />
+  <Backlight position="100,0,200" visible=true frequency=0.3 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
+  
+    <Dialog name="Rick" currentQuestionId="start">
+      <questions>
+        <Question Id= "start" question= "hey can you predect what i will do next?"> 
+          <answerIds>
+            <AnswerId Id="NeverGonnaGiveMeUp" />
+            <AnswerId Id="DontCare"/>
+            <AnswerId Id="Serious" />
+          </answerIds>
+        </Question>
+        
+        <Question Id= "WeAreNoStrangers" question= "We're no strangers to love. You know the rules and so do I. A full commitment's what I'm thinking of,
+You wouldn't get this from any other guy.">
+          <answerIds>
+            <AnswerId Id="whatIamFeeling"/>
+            <AnswerId Id="DontCare"/>
+            <AnswerId Id="IGoNow"/>
+          </answerIds>
+        </Question>
+        
+        <Question Id= "NeverGonnaLetYouDown" question= "Never gonna give you up
+Never gonna let you down
+Never gonna run around and desert you
+Never gonna make you cry
+Never gonna say goodbye
+Never gonna tell a lie and hurt you" >
+          <answerIds>
+            <AnswerId Id="Again"/>
+            <AnswerId Id="IGoNow"/>
+          </answerIds>
+        </Question>
+
+        <Question Id= "leave" question= "That was not what i had in mind but that is way better, thanks for the advidce. I will leave now."/>
+
+      </questions>
+    
+      <answers>
+        <Answer Id= "NeverGonnaGiveMeUp" nextQuestionId ="WeAreNoStrangers" answer= "wait are you the RICK?!" />
+        <Answer Id= "DontCare" nextQuestionId ="end" answer= "I could not care less" />
+        <Answer Id= "Serious" nextQuestionId ="leave" answer= "The same thing you do every night? - try to take over the world?" />
+        <Answer Id= "whatIamFeeling" nextQuestionId ="NeverGonnaLetYouDown" answer= "I just wanna tell you how I'm feeling, gotta make you understand" />
+        <Answer Id= "IGoNow" nextQuestionId ="" answer= "well that strange i guess i go now..." />
+        <Answer Id= "Again" nextQuestionId ="WeAreNoStrangers" answer= "I didn't quiet get it." />
+      </answers>
+
+      <events>
+          <execute>
+              <EventListener event="troll"/>
+          </execute>
+      </events>
+    </Dialog>
+    
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    
+  </Scene>
+</Level>
Index: de/branches/Presentation_HS17/data/levels/DialogueShowcase.oxw
===================================================================
--- /code/branches/Presentation_HS17/data/levels/DialogueShowcase.oxw	(revision 11681)
+++ 	(revision )
@@ -1,79 +1,0 @@
-<LevelInfo
- name = "DialogueShowcase"
- description = "A level to show and test the functionality of the Dialogue module."
- tags = "test"
- screenshot = "emptylevel.png"
-/>
-
-<?lua
-  include("stats.oxo")
-  include("HUDTemplates3.oxo")
-  include("templates/lodInformation.oxt")
-  include("templates/HeavyCruiser.oxt")
-?>
-
-<?lua
-  include("templates/spaceshipEscort.oxt")
-  include("templates/endurancetest_template.oxt")
-?>
-
-<Level>
-  <templates>
-    <Template link=lodtemplate_default />
-  </templates>
-  <?lua include("includes/notifications.oxi") ?>
-  
-
-  <Scene
-    ambientlight = "0.8, 0.8, 0.8"
-    skybox       = "Orxonox/Starbox"
-  >
- <DistanceTrigger name="test" position="100,0,100" target="Pawn" distance=25 stayActive="true" />
-    <Backlight position="100,0,100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
-    
-    <NextQuestion  question="Unknown Spaceship Transmission: Who goes there?" a1="(say your name)" a2="None of your business I'm afraid." >
-     <possibleQuestions> 
-        <NextQuestion  question="You're not cleared for this area, turn back." a1="Doesn't look too exciting here anyways." a2="You gotta make me try...(attack)" />
-        <NextQuestion  question="I'll make it my business. Only military allowed in this area." a1="Whoops, didn't know that, I'll be on my way then." a2="Got an important message for Sgt Smith though." >
-        <possibleQuestions>
-          <NextQuestion  question="Make sure I don't have to see your ugly face again." a1="...thanks, bye." a2="I'll think about it." />
-          <NextQuestion  question="Oh why didn't you say that in the first place? Off you go." a1="Thanks mate." a2="Just don't be so rude next time." />
-        </possibleQuestions>
-      </NextQuestion>
-      </possibleQuestions>    
-      <events>
-        <execute>
-           <EventListener event="test" />
-        </execute>
-      </events>
-    </NextQuestion>
-
-    <DistanceTrigger name="test1" position="100,0,-100" target="Pawn" distance=25 stayActive="true" />
-    <Backlight position="100,0,-100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,1"/>
-    
-    <NextQuestion  question="Hey,  sorry to bother you,  could you help me with something?" a1="Yeah sure." a2="Nope get lost." >
-     <possibleQuestions> 
-        <NextQuestion  question="Do you like fish" a1="...yes?" a2="This is wasting my time." >
-        <possibleQuestions>
-          <NextQuestion  question="Splendid! Would you like your ship to look like one?" a1="..." a2="I'm going now,  okay?" />
-          <NextQuestion  question="Turtles then?" a1="..." a2="Im going now,  okay?" />
-        </possibleQuestions>
-        </NextQuestion>
-        <NextQuestion  question="I can pay you know." a1="Got enough money." a2="...are you deaf? Bye."/>
-      </possibleQuestions>    
-      <events>
-        <execute>
-           <EventListener event="test1" />
-        </execute>
-      </events>
-    </NextQuestion>
-
-    
-
-    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
-
-    
-    
-  </Scene>
-</Level>
Index: /code/branches/Presentation_HS17/data/overlays/HUDTemplates3.oxo
===================================================================
--- /code/branches/Presentation_HS17/data/overlays/HUDTemplates3.oxo	(revision 11681)
+++ /code/branches/Presentation_HS17/data/overlays/HUDTemplates3.oxo	(revision 11682)
@@ -215,6 +215,6 @@
 
     <GUIOverlay
-      name = "Dialogue"
-      guiname = "Dialogue"
+      name = "Dialog"
+      guiname = "Dialog"
       visible = "false"
     />
Index: /code/branches/Presentation_HS17/src/modules/CMakeLists.txt
===================================================================
--- /code/branches/Presentation_HS17/src/modules/CMakeLists.txt	(revision 11681)
+++ /code/branches/Presentation_HS17/src/modules/CMakeLists.txt	(revision 11682)
@@ -26,6 +26,6 @@
 ################ Sub Directories ################
 
+ADD_SUBDIRECTORY(dialog)
 ADD_SUBDIRECTORY(asteroidmining)
-ADD_SUBDIRECTORY(dialogue)
 ADD_SUBDIRECTORY(designtools)
 ADD_SUBDIRECTORY(gametypes)
Index: /code/branches/Presentation_HS17/src/modules/dialog/Answer.cc
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Answer.cc	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Answer.cc	(revision 11682)
@@ -0,0 +1,53 @@
+#include "Answer.h"
+#include "core/CoreIncludes.h"
+
+
+namespace orxonox{
+
+	RegisterClass(Answer);
+
+
+	// Constructor:
+	Answer::Answer(Context* context) : BaseObject(context) 
+	{
+	    RegisterObject(Answer);
+	}
+
+	void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+	{
+		SUPER(Answer, XMLPort, xmlelement, mode);
+
+		XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode);
+		XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode);
+		XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode);
+	}
+
+	void Answer::setAnswerId(const std::string& answerId){
+		this->answerId_ = answerId;
+	}
+
+	const std::string& Answer::getAnswerId() const
+	{
+		return this->answerId_;
+	}
+
+	void Answer::setNextQuestion(const std::string& nextId)
+	{
+		this->nextQuestionId_ = nextId;
+	}
+
+	const std::string& Answer::getNextQuestion() const
+	{
+		return this->nextQuestionId_;
+	}
+
+	void Answer::setAnswer(const std::string& answer)
+	{
+		this->answer_ = answer;
+	}
+
+	const std::string& Answer::getAnswer() const
+	{
+		return this->answer_;
+	}
+}	
Index: /code/branches/Presentation_HS17/src/modules/dialog/Answer.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Answer.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Answer.h	(revision 11682)
@@ -0,0 +1,42 @@
+#ifndef _Answer_H__
+#define _Answer_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+#include <string>
+
+namespace orxonox
+{
+	/**
+	@brief
+    class containing the pc side of the Dialog
+
+    this class contains one possible text option of the pc, it's id and the id of the reaction of the npc to this answer
+	*/
+
+	class _DialogExport Answer : public BaseObject
+	{
+		public:
+			Answer(Context* context);
+			
+			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+			void setAnswerId(const std::string& answerId); //xmlPort-Funktion, setzt AntwortId
+			const std::string& getAnswerId() const;	//xmlPort-Funktion,	gibt AntwortId
+
+			void setNextQuestion(const std::string& nextId); //xmlPort-Funktion, um Dialog zu beenden tag benutzen der von keiner Frage benutzt wird
+			const std::string& getNextQuestion() const;	//xmlPort-Funktion, gibt Id der Folgefrage
+
+			void setAnswer(const std::string& awns);	//xmlPort-Funktion, setzt Antworttext
+			const std::string& getAnswer() const;	//xmlPort-Funktion,	gibt Antworttext
+
+		private:
+			std::string answerId_;	//!< id of the pc textoption	
+			std::string answer_;	//!< string with the pc text
+			std::string nextQuestionId_;	//!< id of the npc reaction to pc answer
+	};
+}
+
+#endif
Index: /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.cc
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.cc	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.cc	(revision 11682)
@@ -0,0 +1,30 @@
+#include "AnswerId.h"
+#include "core/CoreIncludes.h"
+
+
+namespace orxonox{
+
+	RegisterClass(AnswerId);
+
+	AnswerId::AnswerId(Context* context) : BaseObject(context)
+	{
+		RegisterObject(AnswerId);
+	}
+
+	void AnswerId::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+	{
+		SUPER(AnswerId, XMLPort, xmlelement, mode);
+
+		XMLPortParam(AnswerId, "Id", setId, getId, xmlelement, mode);
+	}
+
+	void AnswerId::setId(const std::string& id)
+	{
+		this->id_ = id;
+	}
+	
+	const std::string& AnswerId::getId() const
+	{
+		return this->id_;
+	}
+}
Index: /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/AnswerId.h	(revision 11682)
@@ -0,0 +1,33 @@
+#ifndef _AnswerID_H__
+#define _AnswerID_H__
+
+#include "core/XMLPort.h"
+#include "core/BaseObject.h"
+#include "core/CoreIncludes.h"
+
+#include <string>
+
+namespace orxonox{
+
+	/**
+	@brief
+    container class for answerids in xml
+
+	*/
+
+	class AnswerId : public BaseObject
+	{
+		public:
+			AnswerId(Context* context);
+			
+			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setId(const std::string& Id);	//allows to set Id, only use in xmlPort for initializing AnswerIds in lvl files
+            const std::string& getId() const;	//allows to get Id, used in xmlPort
+
+		private: 
+			std::string id_;	//!< id of one answer
+	};
+}
+
+#endif
Index: /code/branches/Presentation_HS17/src/modules/dialog/CMakeLists.txt
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/CMakeLists.txt	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/CMakeLists.txt	(revision 11682)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(DIALOG_SRC_FILES
+  DialogManager.cc
+  Dialog.cc
+  Question.cc
+  Answer.cc
+  AnswerId.cc
+)
+
+ORXONOX_ADD_LIBRARY(dialog
+  MODULE
+  FIND_HEADER_FILES
+   TOLUA_FILES
+   DialogManager.h
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${DIALOG_SRC_FILES}
+)
Index: /code/branches/Presentation_HS17/src/modules/dialog/Dialog.cc
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Dialog.cc	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Dialog.cc	(revision 11682)
@@ -0,0 +1,123 @@
+#include "DialogManager.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "Dialog.h"
+#include "Question.h"
+
+
+namespace orxonox
+{
+
+	RegisterClass(Dialog);
+	
+	//Constructor: 
+	Dialog::Dialog(Context* context) : BaseObject(context)
+	{
+		RegisterObject(Dialog);
+	}
+
+	void Dialog::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+	{
+		SUPER(Dialog, XMLPort, xmlelement, mode);
+
+		XMLPortParam(Dialog, "name", setName, getName, xmlelement, mode);
+		XMLPortParam(Dialog, "currentQuestionId", setCurrentQuestionId, getCurrentQuestionId, xmlelement, mode);
+		XMLPortObject(Dialog, Question, "questions", addQuestion, getQuestion, xmlelement, mode);
+		XMLPortObject(Dialog, Answer, "answers", addAnswer, getAnswer, xmlelement, mode);
+	}
+
+	void Dialog::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialog, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventSink(Dialog, BaseObject, "execute", execute, xmlelement, mode); 
+    }
+
+	void Dialog::setName(const std::string& name)
+	{
+		this->name_ = name;
+	}
+
+	const std::string& Dialog::getName() const 
+	{
+		return this->name_;
+	}
+
+	void Dialog::setCurrentQuestionId(const std::string& questionId)
+	{
+		this->currentQuestionId_ = questionId;
+	}
+
+	const std::string& Dialog::getCurrentQuestionId() const
+	{
+		return this->currentQuestionId_;
+	}
+
+
+	void Dialog::addQuestion(Question* question) //fuegt Question der Map hinzu
+	{
+		this->questions_.insert(make_pair(question->getQuestionId(), question));
+	}
+
+	const Question* Dialog::getQuestion() const // returned nichts
+	{
+		return nullptr;
+	}
+
+	void Dialog::addAnswer(Answer* answer) //fuegt Answer der Map hinzu
+	{
+		this->answers_.insert(make_pair(answer->getAnswerId(), answer));
+	}
+
+	const Answer* Dialog::getAnswer(unsigned int index) const	//returned sting der Antwort zur Id.
+	{
+		return nullptr;
+	}
+
+
+	const std::vector<std::string>* Dialog::getAnswerIds() // returned vector mit allen momentanen AntwortenIds
+	{
+		
+		Question* question = (this->questions_.find(this->currentQuestionId_))->second;
+		const std::vector<std::string>* answers = question->getAnswerIds();
+		return answers;
+		
+	} 
+	
+	bool Dialog::execute(bool bTriggered, BaseObject* trigger)
+    {  
+    	DialogManager& m = DialogManager::getInstance();
+    	
+    	if(questions_.count(this->currentQuestionId_)){
+    		m.setDialog(this);
+    		OrxonoxOverlay::showOverlay("Dialog");
+    	}
+    	else {
+    		orxout() << "no start defined " << endl;
+    	}
+    	
+        return false;
+    }
+
+    void Dialog::update(const std::string& givenAnswerId)
+    {
+    	Answer* answer = (answers_.find(givenAnswerId))->second;
+    	this->currentQuestionId_ = answer->getNextQuestion();
+    }
+
+    bool Dialog::ending(const std::string& givenAnswerId)
+    {
+    	return !this->questions_.count(this->answers_.find(givenAnswerId)->second->getNextQuestion());
+    }
+
+	const std::string& Dialog::getQuestionString()
+	{
+		return this->questions_.find(this->currentQuestionId_)->second->getQuestion();
+	}
+
+	const std::string& Dialog::getAnswerString(std::string answerId)
+	{
+		return this->answers_.find(answerId)->second->getAnswer();
+	}
+}
Index: /code/branches/Presentation_HS17/src/modules/dialog/Dialog.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Dialog.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Dialog.h	(revision 11682)
@@ -0,0 +1,117 @@
+#ifndef _Dialog_H__
+#define _Dialog_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "Question.h"
+#include "Answer.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+#include "overlays/OrxonoxOverlay.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+namespace orxonox
+{
+		/**
+	@brief
+    class containing core of one dialog with one npc
+
+    this class contains a map of all answerids to answers (player text options) and one of all questionids to questions (npc text options)
+    it realizes a state machine with the question beeing the states and the answers beeing the connections, it has a current state and
+    can be commanded to go to the next state according to a given answer
+	*/
+
+	class _DialogExport Dialog : public BaseObject
+	{
+		public:
+			Dialog(Context* context);
+
+			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+			virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+			void setName(const std::string& name);	//xmlPort-Funktion, sets Namen
+			const std::string& getName() const;	//xmlPort-Funktion, returns Namen
+
+			void setCurrentQuestionId(const std::string& questionId);	//xmlPort-Funktion, sets string id of current question
+			const std::string& getCurrentQuestionId() const;	//xmlPort-Funktion, returns id of current question
+
+			void addQuestion(Question* question); //xmlPort-Funktion, adds question to map
+			const Question* getQuestion() const; //xmlPort-Funktion, returns nullptr
+
+			void addAnswer(Answer* answer); //xmlPort-Funktion, adds answer to map
+			const Answer* getAnswer(unsigned int index) const; //xmlPort-Funktion, returns nullptr
+
+			/**
+	        @brief
+	            returns a pointer to the array of answers belonging to the current question for use in dialogManager
+
+	        @return
+	            pointer to answerId array of question
+	        */
+			const std::vector<std::string>* getAnswerIds(); 
+
+			/**
+	        @brief
+	            function called when the trigger object defined in the xml file sets to triggered
+
+	        @param bTriggered
+	            needs to be set like this for correctness
+	        @param trigger
+	            needs to be set like this for correctness
+	        @return
+	           	not really used
+	        */
+	 		bool execute(bool bTriggered, BaseObject* trigger);
+
+	 		/**
+	        @brief
+	            updates the current Dialog according to the id of a given answer, by setting currentQuestionId to the next one
+
+	        @param givenAnswerId
+	        	id of the answer given by player
+	        */
+			void update(const std::string& givenAnswerId);
+
+			/**
+	        @brief
+	            tests if there is a next question for the given answerId
+
+	        @param givenAnswerId
+				id of the answer given by player
+	        @return
+	           	true if there is no more Question to the given answerId
+	        */
+			bool ending(const std::string& givenAnswerId);
+
+			/**
+	        @brief
+	            gives the text of the npc in the current state
+
+	        @return
+	           	sting with npc text
+	        */
+			const std::string& getQuestionString();
+
+			/**
+	        @brief
+	            returns a sting with the pc answer to the id 
+
+	        @param answerId
+	        	the id of the answer looked for
+	        @return
+	           	sting with answer
+	        */
+			const std::string& getAnswerString(std::string answerId);
+
+		private: 
+			std::string name_;	//!< name of the npc talking
+			std::string currentQuestionId_;	//!< id of the npc question currently active
+			std::map<std::string, Question*> questions_;	//!< a map form the ids of npc textoptions to the objects containing them
+			std::map<std::string, Answer*> answers_;	//!< a map form the ids of npc textoptions to the objects containing them
+	};
+}
+
+#endif
Index: /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.cc
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.cc	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.cc	(revision 11682)
@@ -0,0 +1,62 @@
+#include "DialogManager.h"
+#include "core/CoreIncludes.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include <string>
+
+namespace orxonox {
+	ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
+	
+
+	
+	DialogManager::DialogManager()
+	{
+		this->currentTalk_ = nullptr;
+	}
+
+	void DialogManager::setDialog(Dialog* dialog)
+	{
+		this->currentTalk_ = dialog;
+		answerIds_ = currentTalk_->getAnswerIds();	
+	}
+
+	//from here onward funcionality for lua axports
+
+    std::string DialogManager::getQuestion()
+    {
+    	return this->currentTalk_->getQuestionString();
+    }
+
+    int DialogManager::getSize()
+    {   
+        return this->answerIds_->size();
+    }
+
+    std::string DialogManager::getAnswer(int index)
+    {
+    	return this->currentTalk_->getAnswerString(this->answerIds_->at(index));
+    }
+	
+    std::string DialogManager::getPerson()
+    {
+    	return this->currentTalk_->getName();
+    }
+
+    bool DialogManager::endtest(int index)
+    {   
+        if(this->answerIds_->empty())
+        {
+            return true;
+        }
+        else 
+        {
+            return this->currentTalk_->ending(this->answerIds_->at(index));
+        }
+
+    }
+
+    void DialogManager::update(int index)
+    {
+    	this->currentTalk_->update(answerIds_->at(index));
+    	answerIds_ = this->currentTalk_->getAnswerIds();
+    }
+}
Index: /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/DialogManager.h	(revision 11682)
@@ -0,0 +1,128 @@
+#ifndef _DialogManager_H__
+#define _DialogManager_H__
+
+#include "DialogPrereqs.h"
+#include "util/Singleton.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include "core/object/Listable.h"
+#include "Dialog.h"
+
+#include <string>
+
+namespace orxonox //tolua_export
+
+{//tolua_export
+
+    /**
+    @brief
+    this class is used for calling on a dialog form luascript
+
+    the class is the interface of dialog to lua, all lua functionallity is given by this class, it can be found by lua due to singleton definition
+
+    @todo 
+        reseting or setting new start for dialog on exit, to allow coming back to a npc
+        picture of person
+        parameters to differ dialog depending on some world values, like items, completed objectives etc...
+    */
+
+    class _OrxonoxExport DialogManager //tolua_export
+    : public Singleton<DialogManager>
+    {//tolua_export
+        friend class Singleton<DialogManager>;
+    
+        public:
+        
+        DialogManager(); 
+
+        /**
+        @brief
+            gives the pointer to the sigleton dialog manager to the lua script
+
+        @return
+            returns pointer
+        */
+
+        static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); } //tolua_export
+
+        /**
+        @brief
+            allows to set the current dialog
+
+            this is used by a dialog when triggered to set its self to the current dialog
+
+        @param dialog
+            pointer to the dialog that wants to be current one
+        */
+        void setDialog(Dialog* dialog);
+
+        //from here on functions for lua interface
+
+        /**
+        @brief
+            gives the string of the momentary npc textoption
+
+        @return
+            string of npc text
+        */
+        std::string getQuestion(); //tolua_export
+
+        /**
+        @brief
+            function that returns size of answerid array
+
+        @return
+            returns number of possible answers to momentary questions, 0 if there are no player text options
+        */
+        int getSize(); //tolua_export
+
+        /**
+        @brief
+            returns the answer to the id that is at index in the array of answers
+
+        @param param1
+            index of desired answer
+
+        @return
+            string of answer
+        */
+        std::string getAnswer(int index); //tolua_export
+
+        /**
+        @brief
+            gives name of npc the player is currently talking to
+
+        @return
+            sting with name
+        */
+        std::string getPerson(); //tolua_export
+
+        /**
+        @brief
+            tests the dialog if there are any followup npc textoptions to the given answer or if there are no answers to the current question 
+
+        @return
+            true if the answer array of the question is empty or the next question id of the answer does not exist
+        */
+        bool endtest(int index); //tolua_export
+
+        /**
+        @brief
+            tells the dialog to update according to a given answer, if no answer is actively clicked the standard index is sett 0 in the lua
+            when called the current question of the dialog is set to the new one and the answerId vector is set accordingly 
+
+        @param param1
+            index of the answer given by the player
+
+        */
+        void update(int index); //tolua_export
+
+private:
+    static DialogManager* singletonPtr_s;   //!< a pointer to the single class object
+
+    Dialog* currentTalk_;   //!< pointer to the currently active dialog or last active if no one is currently active
+    const std::vector<std::string>* answerIds_; //!< pointer to the possible answerIds of the current question, for faster access
+
+    };//tolua_export
+}//tolua_export
+
+#endif /* _DialogManager_H__ */
Index: /code/branches/Presentation_HS17/src/modules/dialog/DialogPrereqs.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/DialogPrereqs.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/DialogPrereqs.h	(revision 11682)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _DialogPrereqs_H__
+#define _DialogPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Dialog_STATIC_BUILD)
+#  ifdef Dialog_SHARED_BUILD
+#    define _DialogExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _DialogExport
+#    else
+#      define _DialogExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _DialogPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _DialogExport  __attribute__ ((visibility("default")))
+#  define _DialogPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _DialogExport
+#  define _DialogPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class DialogManager;
+    class Dialog;
+    class Answer;
+    class Question;
+    class AnswerId;
+   
+}
+
+#endif /* _DialogPrereqs_H__ */
Index: /code/branches/Presentation_HS17/src/modules/dialog/Question.cc
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Question.cc	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Question.cc	(revision 11682)
@@ -0,0 +1,59 @@
+#include "Question.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+
+	RegisterClass(Question);
+
+	Question::Question(Context* context) : BaseObject(context)
+	{
+		RegisterObject(Question);
+	}
+
+	void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
+	{
+		SUPER(Question, XMLPort, xmlement, mode);
+
+		XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
+		XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
+
+		XMLPortObject(Question, AnswerId, "answerIds", addAnswerId, getAnswerId, xmlement, mode);
+	}
+
+	void Question::setQuestionId(const std::string& Id)
+	{
+		this->questionId_ = Id;
+	}
+
+	const std::string& Question::getQuestionId() const
+	{
+		return this->questionId_;
+	}
+
+	void Question::setQuestion(const std::string& question)
+	{
+		this->question_ = question;
+	}
+
+	const std::string& Question::getQuestion() const
+	{
+		return this->question_;
+	}
+
+	void Question::addAnswerId(AnswerId* answerId)
+	{
+		this->answerIds_.push_back(answerId->getId());
+	}
+
+	const AnswerId* Question::getAnswerId() const
+	{
+		return nullptr;
+	}
+
+	const std::vector<std::string>* Question::getAnswerIds()
+	{
+		return &(this->answerIds_);
+	}
+	
+}
Index: /code/branches/Presentation_HS17/src/modules/dialog/Question.h
===================================================================
--- /code/branches/Presentation_HS17/src/modules/dialog/Question.h	(revision 11682)
+++ /code/branches/Presentation_HS17/src/modules/dialog/Question.h	(revision 11682)
@@ -0,0 +1,57 @@
+#ifndef _Question_H__
+#define _Question_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "AnswerId.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+
+
+#include <string>
+
+namespace orxonox
+{
+
+	/**
+	@brief
+    class containing the npc side of the Dialog
+
+    this class contains one possible text option of the npc, it's id and the ids of possible player reactions (answers)
+	*/
+
+	class _DialogExport Question : public BaseObject
+	{
+		public:
+			Question(Context* context);
+
+			virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
+
+			void setQuestionId(const std::string& Id);	//xmlPort-Funktion, setzt Id
+			const std::string& getQuestionId() const;	//xmlPort-Funktion, gibt Id string zuruek
+
+			void setQuestion(const std::string& question);	//xmlPort-Funktion, setzt Fragen string
+			const std::string& getQuestion() const;	//xmlPort-Funktion, gibt Fragen string
+
+			void addAnswerId(AnswerId* answerId); 	//xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
+			const AnswerId* getAnswerId() const;	//xmlPort-Funktion, gibt nichts zuruek
+
+			/**
+	        @brief
+	            gives pointer to possivle answerIds of this question
+
+	        @return
+	           	returns pointer to the array with ids of possible pc textoptions
+	        */
+			const std::vector<std::string>* getAnswerIds(); //returnt Pointer auf Vektor mit allen Ids
+
+
+
+		private: 	
+			std::string questionId_;	//!< id of npc textoption	
+			std::string question_;	//!< string with npc text
+			std::vector<std::string> answerIds_;	//!< vector with possible player reactions
+	};
+}
+
+#endif
