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
