Index: code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout
===================================================================
--- code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout	(revision 11579)
+++ code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout	(revision 11579)
@@ -0,0 +1,32 @@
+<?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 Type="MenuWidgets/TabControl" Name="orxonox/SingleplayerTabControl" >
+                    <Property Name="TabHeight" Value="{0,26.4388}" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="TabPanePosition" Value="Top" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0,95,0},{0.925,0}}" />
+                </Window>
+            </Window>
+        </Window>
+         
+    </Window>
+</GUILayout>
Index: code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua
===================================================================
--- code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua	(revision 11579)
+++ code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua	(revision 11579)
@@ -0,0 +1,112 @@
+
+-- Dialog.lua
+
+local P = createMenuSheet("Dialog")
+
+P.wrapper = nil
+P.answerList = {}
+P.scrollbarWidht = 13
+P.selectedAnswer = {}
+
+P.showing = false
+
+-- Design parameters
+P.imageHeight = 50
+P.detailImageSize = 100
+P.textHeight = 30
+P.buttonWidth = 85
+
+function P.onLoad()
+    P.wrapper = nil
+
+end
+
+function P.onShow()
+    orxonox.CommandExecutor:execute("setTimeFactor 0")
+    P.createDialog()
+    P.showing = true
+
+end
+
+function P.onHide()
+    orxonox.CommandExecutor:execute("setTimeFactor 1")
+    P.showing = false
+    P.cleanup(true)
+end
+
+function P.update()
+    P.updateDialog()
+    if P.showing == false then
+        return
+    end
+
+    P.cleanup(false)
+end
+
+function P.createDialog()
+
+    local dialogManager = orxonox.DialogManager:getInstance()
+    
+    root = winMgr:getWindow("orxonox/Dialogue/Inventory")
+    local dialog = dialogManager:getCurrentDialog()
+    root:setText(dialog:getQuestion)
+    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)
+    
+    acceptButton = winMgr:createWindow("MenuWidgets/Button", "/a2Button")   --a2 da graphik aus version mit 2 knoepfen uebernommen
+    acceptButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, (P.imageHeight-P.textHeight)/2)))
+    acceptButton:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight)))
+    acceptButton:setText("accept")
+    orxonox.GUIManager:subscribeEventHelper(acceptButton, "Clicked", P.name ..".acceptButton_clicked")
+    P.wrapper:addChildWindow(acceptButton)
+    
+    P.answerList = {}                       -- erstellen der tabelle aus AntwortIds und Antworten im Lua
+    local answers = dialog:getAnswers()
+    for ans in answers do
+        P.answerList[ans] = dialog:getAnswer(ans)
+    end
+    --todo herausfinden wie antworten in tabelle enzeigen
+end
+
+
+function P.updateDialog()
+    local dialog = orxonox.DialogManager:getInstance():getDialog()
+    root:setText(dialog:getQuestion)
+    --todo: tabellen updaten 
+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.acceptButton_clicked(e)
+    local ending = orxonox.DialogManager:getInstance():getDialog:ending()
+    
+    if ending then
+        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
+    
+    --herausfindne wie tabelleneintrag uebergeben wird
+    else
+        P.update()
+    end
+end
+
+return P
Index: code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw
===================================================================
--- code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw	(revision 11579)
+++ code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw	(revision 11579)
@@ -0,0 +1,77 @@
+<LevelInfo
+ name = "DialogueShowcase2"
+ 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"/>
+    
+    <Dialog name="Kurt" currentQuestionId="loop">
+      <Question question="Soll ich dich loopen?" Id="loop">
+        <AnswerId Id="ja"/>
+        <AnswerId Id="nein"/>
+      </Question>
+      <Question question="Dann eben nicht" Id="ok"/>
+      <Answer Id="ja" answer="ja loop mich" nextQuestionId="loop"/>
+      <Answer Id="nein" answer="lieber nicht" nextQuestionId="ok"/>
+      <events>
+        <execute>
+          <EventListener event="test"/>
+        </execute>
+      </events>
+    </Dialog>
+
+    <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>
