Index: code/branches/presentation/data/gui/layouts/DockingDialog.layout
===================================================================
--- code/branches/presentation/data/gui/layouts/DockingDialog.layout	(revision 8561)
+++ code/branches/presentation/data/gui/layouts/DockingDialog.layout	(revision 8561)
@@ -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/presentation/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/branches/presentation/data/gui/scripts/DockingDialog.lua	(revision 8561)
+++ code/branches/presentation/data/gui/scripts/DockingDialog.lua	(revision 8561)
@@ -0,0 +1,66 @@
+-- DockingDialog.lua
+
+local P = createMenuSheet("DockingDialog")
+
+P.docks = {}
+
+function P.onLoad()
+
+     --button are arranged in a 1x2 matrix
+    P:setButton(1, 1, {
+            ["button"] = winMgr:getWindow("orxonox/DockingDockButton"),
+            ["callback"]  = P.dockButton_clicked
+    })
+
+    P:setButton(1, 2, {
+            ["button"] = winMgr:getWindow("orxonox/DockingCancelButton"),
+            ["callback"]  = P.cancelButton_clicked
+    })
+    
+end
+
+function P.onShow()
+    orxonox.execute("setPause 1")
+    P.update()
+end
+
+function P.onHide()
+    orxonox.execute("setPause 0")
+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]
+        if dock ~= nil then
+            dock:dock()
+        end
+    end
+    hideMenuSheet(P.name)
+end
+
+function P.cancelButton_clicked(e)
+    hideMenuSheet(P.name)
+end
+
+return P
Index: code/branches/presentation/data/levels/docking.oxw
===================================================================
--- code/branches/presentation/data/levels/docking.oxw	(revision 8561)
+++ code/branches/presentation/data/levels/docking.oxw	(revision 8561)
@@ -0,0 +1,209 @@
+<LevelInfo
+ name = "Transporter"
+ description = "Level with a Transporter. Demonstrates the docking system."
+ tags = ""
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")
+  include("stats.oxo")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name         = "Transporter"
+ description  = "Docking example level"
+>
+  <templates>
+    <Template link="lodtemplate_default" />
+  </templates>
+
+  <Scene
+   ambientlight = "0.5, 0.5, 0.5"
+   skybox       = "Orxonox/skypanoramagen1"
+  >
+
+    <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" />
+
+    <?lua for i = 1, 10, 1 do ?>
+      <SpawnPoint position="<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" lookat="0,0,0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+    <?lua end ?>
+
+
+
+      <SpaceShip
+   position               = "280, 150, 115"
+   orientation            = "0.5, 0.5, 0.5, 0.5"
+   hudtemplate            = "spaceshiphud"
+   camerapositiontemplate = "spaceshipassffcameras"
+   engine                 = "spaceshipassffengine"
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = "3"
+   explosionchunks        = "6"
+
+   health            = "100"
+   maxhealth         = "200"
+   initialhealth     = "100"
+
+   primaryThrust     = "100;"
+   auxilaryThrust    = "30;"
+   rotationThrust    = "25;"
+
+   collisionType     = "dynamic"
+   mass              = "100"
+   linearDamping     = "0.7"
+   angularDamping    = "0.9999999"
+  >
+    <attached>
+        <DistanceTriggerBeacon name="bcnSpaceShip" />
+        <DockingTarget name="spaceShip" />
+
+      <Model position="0,0,0" yaw="90" pitch="-90" roll="0" scale="4" mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude="0.1" frequency="0.5" quadratic="1" />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude="0.1" frequency="0.5" phase="180" quadratic="1" />
+      <DistanceTriggerBeacon name="PlayerDistanceTrigger" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
+      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
+    </collisionShapes>
+<?lua
+  include("includes/weaponSettingsAssff.oxi")
+?>
+  </SpaceShip>
+
+    
+
+
+    <Destroyer
+      position          = "100,150,100"
+      collisionType     = "dynamic"
+      mass              = "100000"
+      velocity          = "0,0,0"
+      angularDamping    = "0.9999999"
+      health            = "10000"
+      maxhealth         = "10000"
+      initialhealth     = "10000"
+    >
+
+      <attached>
+
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+
+
+        <Dock orientation="0.5, 0.5, 0.5, 0.5">
+            <animations>
+                <MoveToDockingTarget target="destroyer" position="10,150,40" />
+            </animations>
+            <effects>
+                <DockToShip target="spaceShip" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event="dockMe" />
+                </execute>
+            </events>
+            <attached>
+                <DistanceTrigger position="0,0,-200" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" />
+                <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" />
+            </attached>
+        </Dock>
+
+
+        <TeamSpawnPoint team="1" position="150,0,7" direction="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="0,0,7" lookat="-1,0,0" roll="90"  yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="-50,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="100,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="50,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <?lua for i = 1, 100, 1 do ?>
+          <TeamSpawnPoint
+            team="0"
+            position="<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>"
+            lookat="0,0,0"
+            spawnclass="SpaceShip"
+            pawndesign="spaceshipassff"
+          />
+        <?lua end ?>
+
+        <Model mesh="Carrier.mesh" scale="5" />
+        <Backlight
+          mainstate="activity"
+          active="false"
+          scale="0.4"
+          name="bltest"
+          position=" 7.6, 0, 6"
+          colour="0.2, 0.65, 1.0, 1.0"
+          width="15"
+          length="1500"
+          lifetime="2"
+          elements="50"
+          trailmaterial="Trail/backlighttrail"
+          turnontime="1"
+          turnofftime="1"
+          material="Flares/ThrusterFlare1"
+        />
+        <Backlight
+                  scale="1"
+                  position=" 169, 75, -15"
+                  colour="1, 0.85, 0.5, 0.5"
+                  width="40"
+                  length="1000"
+                  lifetime="5"
+                  elements="15"
+                  trailmaterial="Trail/backlighttrail"
+                  material="Examples/Flare"
+                  />
+        <Backlight
+                  scale="1"
+                  position=" 169, -75, -15"
+                  colour="1, 0.85, 0.5, 0.5"
+                  width="40"
+                  length="1000"
+                  lifetime="5"
+                  elements="15"
+                  trailmaterial="Trail/backlighttrail"
+                  material="Examples/Flare"
+         />
+        <?lua for i=0,8,1 do ?>
+          <BlinkingBillboard
+            position="<?lua print(200-270/8*i)?> ,15,2"
+            material="Examples/Flare"
+            colour="1.0, 0.5, 0.3"
+            phase="<?lua print(-360/8*i)?>"
+            amplitude="0.1"
+            frequency="0.5"
+            quadratic="1"
+          />
+
+          <BlinkingBillboard
+            position="<?lua print(200-270/8*i)?>,-15,2"
+            material="Examples/Flare"
+            colour="1.0, 0.5, 0.3"
+            phase="<?lua print(-360/8*i)?>"
+            amplitude="0.1"
+            frequency="0.5"
+            quadratic="1"
+          />
+        <?lua end ?>
+
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
+        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
+        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
+        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
+        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
+        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
+        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
+      </collisionShapes>
+
+    </Destroyer>
+
+  </Scene>
+</Level>
