Index: code/branches/dockingsystem2/data/gui/layouts/DockingDialog.layout
===================================================================
--- code/branches/dockingsystem2/data/gui/layouts/DockingDialog.layout	(revision 8434)
+++ code/branches/dockingsystem2/data/gui/layouts/DockingDialog.layout	(revision 8434)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/DockingBackground" >
+        <Property Name="FrameEnabled" Value="False" />
+        <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}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/DockingTitle" >
+            <Property Name="Text" Value="Docking" />
+            <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.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />
+            <Window Type="MenuWidgets/Listbox" Name="orxonox/DockingDocks" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
+            </Window>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/DockingDockButton" >
+            <Property Name="Text" Value="Dock" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="DockingDialog.dockButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/DockingCancelButton" >
+            <Property Name="Text" Value="Cancel" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="DockingDialog.cancelButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>
Index: code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua	(revision 8434)
+++ code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua	(revision 8434)
@@ -0,0 +1,58 @@
+-- DockingDialog.lua
+
+local P = createMenuSheet("DockingDialog")
+
+P.docks = {}
+
+function P.onLoad()
+    
+end
+
+function P.onShow()
+    P.update()
+    orxonox.CommandExecutor:execute("pause")
+end
+
+function P.onHide()
+    orxonox.CommandExecutor:execute("pause")
+end
+
+function P.update()
+    -- update dock list
+    P.docks = {}
+    local docks = orxonox.Dock:getNumberOfActiveDocks()
+    for i = 0, docks-1 do
+        table.insert(P.docks, orxonox.Dock:getActiveDockAtIndex(i))
+    end
+
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/DockingDocks"))
+    listbox:resetList()
+
+    for k in pairs(P.docks) do
+        local item = CEGUI.createListboxTextItem("Dock " .. k)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        listbox:addItem(item)
+    end
+end
+
+function P.dockButton_clicked(e)
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/DockingDocks"))
+    local choice = listbox:getFirstSelectedItem()
+    if choice ~= nil then
+        local index = listbox:getItemIndex(choice)
+        local dock = P.docks[index+1]
+        cout(0, index )--.. ": " .. P.docks[index])
+        if dock ~= nil then
+            cout(0, "LUA>Docking")
+            dock:dock()
+        end
+    end
+    hideMenuSheet(P.name)
+end
+
+function P.cancelButton_clicked(e)
+    --P.hideMe()
+    hideMenuSheet(P.name)
+end
+
+return P
