Index: code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout
===================================================================
--- code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout	(revision 11612)
+++ code/branches/Dialog_HS17/data/gui/layouts/Dialog.layout	(revision 11642)
@@ -2,9 +2,9 @@
 
 <GUILayout >
-    <Window Type="DefaultWindow" Name="orxonox/Dialogue/Background" > 
+    <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/Dialogue/Inventory" >
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Options" >
             <Property Name="Alpha" Value="0.8" />
             <Property Name="InheritsAlpha" Value="False" />
@@ -13,17 +13,39 @@
             <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" />
+
+            <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/Dialog/Question" >
+                <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.3,0},{0.05,0},{0.95,0},{0.15,0}}" />
+            </Window>
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/DialogAns" >
+                <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.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="UnifiedAreaRect" Value="{{0.604166,0},{0.15,0},{0.958333,0},{0.636,0}}" />
+                <Window Type="MenuWidgets/Listbox" Name="orxonox/AnsListbox" >
                     <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}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.225,0},{0.95,0},{0.92,0}}" />
+                    <Event Name="ItemSelectionChanged" Function="Dialog.answer_changed" />
                 </Window>
+            </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>
Index: code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua
===================================================================
--- code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua	(revision 11612)
+++ code/branches/Dialog_HS17/data/gui/scripts/Dialog.lua	(revision 11642)
@@ -5,5 +5,4 @@
 P.wrapper = nil
 P.detailsWindows = {}
-
 P.showing = false
 
@@ -32,34 +31,51 @@
 end
 
-function P.update()
-    P.updateDialog()
-end
-
 function P.createDialog()
 
     local manager = orxonox.DialogManager: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)
     
+    local personfield = winMgr:getWindow("orxonox/Dialog/Person")
+    local person = manager:getPerson()
+    personfield:setText(person)
+
+    local questionfiled = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfiled:setText(question)
+
+    listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+
+    local themeList = {}
+    --[[
+    table.insert(themeList, "Default")
+    table.insert(themeList, "Drum n' Bass")
+    table.insert(themeList, "8-Bit Style")
+    table.insert(themeList, "Corny Jazz")
+    table.insert(themeList, "Metal")
     --]]
-    detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
-    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.5, (P.imageHeight-P.textHeight)/2)))
-    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0.25, 0), CEGUI.UDim(0, P.textHeight)))
-    detailsButton:setText("say")
-    orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".Button_clicked")
-    P.wrapper:addChildWindow(detailsButton)
-    --]]
+    local anssize = manager:getSize()
 
+    for index = 0, anssize -1, 1 do
+        table.insert(themeList, manager:getAnswer(index))
+    end  
+
+    for k,v in pairs(themeList) do
+        item = CEGUI.createListboxTextItem(v)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listboxwindow):addItem(item)
+    end
 end
 
 function P.updateDialog()
-    --local questionn = orxonox.DialogueManager:getInstance():getquestion()
-    --root:setText("test")
+    local manager = orxonox.DialogManager:getInstance()
+    --manager:update()
+
+    local questionfiled = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfiled:setText(question)
+end
+
+function P.answer_changed(e)
+    -- body
 end
 
@@ -86,14 +102,14 @@
 
 function P.Button_clicked(e)
-    --local ending = orxonox.DialogManager:getInstance():theEnd()
+    local ending = orxonox.DialogManager:getInstance():endtest()
+    orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
     
-    --if ending then
+    if ending then
         orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
     
     
-   -- else 
-   --     orxonox.DialogueManager:getInstance():a1clicked()
-   --     P.update()
-   -- end
+    else 
+        P.updateDialog(index)
+    end
 end
 
Index: code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw
===================================================================
--- code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw	(revision 11612)
+++ code/branches/Dialog_HS17/data/levels/DialogueShowcase2.oxw	(revision 11642)
@@ -33,11 +33,17 @@
     
     <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"/>
+      <questions>
+        <Question question="Soll ich dich loopen?" Id="loop">
+          <answerIds>
+            <AnswerId Id="ja"/>
+            <AnswerId Id="nein"/>
+          </answerIds>
+        </Question>
+        <Question question="Dann eben nicht" Id="ok"/>
+      </questions>
+      <answers>
+        <Answer Id="ja" answer="ja loop mich" nextQuestionId="loop"/>
+        <Answer Id="nein" answer="lieber nicht" nextQuestionId="ok"/>
+      </answers>
       <events>
         <execute>
