Index: code/trunk/data/gui/layouts/GUILayout.xsd
===================================================================
--- code/trunk/data/gui/layouts/GUILayout.xsd	(revision 9251)
+++ code/trunk/data/gui/layouts/GUILayout.xsd	(revision 9348)
@@ -2,61 +2,61 @@
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
 
-	<xsd:element name="GUILayout" type="GUILayoutType"/>
-	
-	<xsd:complexType name="GUILayoutType">
-		<xsd:sequence>
-			<xsd:element name="Window" type="WindowType" />
-		</xsd:sequence>
-		<xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
-	</xsd:complexType>
-	
-	<xsd:complexType name="WindowType">
-		<xsd:sequence>
-			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:choice minOccurs="0" maxOccurs="unbounded">
-				<xsd:element name="Window" type="WindowType" />
-				<xsd:element name="AutoWindow" type="AutoWindowType" />
-			</xsd:choice>
-			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-		</xsd:sequence>
-		<xsd:attribute name="Type" type="xsd:string" use="required"/>
-		<xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
-	</xsd:complexType>
+    <xsd:element name="GUILayout" type="GUILayoutType"/>
 
-	<xsd:complexType name="AutoWindowType">
-		<xsd:sequence>
-			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
-			<xsd:choice minOccurs="0" maxOccurs="unbounded">
-				<xsd:element name="Window" type="WindowType" />
-				<xsd:element name="AutoWindow" type="AutoWindowType" />
-			</xsd:choice>
-			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-		</xsd:sequence>
-		<xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
-	</xsd:complexType>
+    <xsd:complexType name="GUILayoutType">
+        <xsd:sequence>
+            <xsd:element name="Window" type="WindowType" />
+        </xsd:sequence>
+        <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
+    </xsd:complexType>
 
-	<xsd:complexType name="PropertyType">
-		<xsd:simpleContent>
-			<xsd:extension base="xsd:string">
-				<xsd:attribute name="Name" type="xsd:string" use="required"/>
-				<xsd:attribute name="Value" type="xsd:string" use="optional"/>
-			</xsd:extension>
-		</xsd:simpleContent> 
-	</xsd:complexType>
+    <xsd:complexType name="WindowType">
+        <xsd:sequence>
+            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Window" type="WindowType" />
+                <xsd:element name="AutoWindow" type="AutoWindowType" />
+            </xsd:choice>
+            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+        <xsd:attribute name="Type" type="xsd:string" use="required"/>
+        <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
+    </xsd:complexType>
 
-	<xsd:complexType name="LayoutImportType">
-		<xsd:attribute name="Filename" type="xsd:string" use="required"/>
-		<xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
-		<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
-	</xsd:complexType>
+    <xsd:complexType name="AutoWindowType">
+        <xsd:sequence>
+            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Window" type="WindowType" />
+                <xsd:element name="AutoWindow" type="AutoWindowType" />
+            </xsd:choice>
+            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+        </xsd:sequence>
+        <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
+    </xsd:complexType>
 
-	<xsd:complexType name="EventType">
-		<xsd:attribute name="Name" type="xsd:string" use="required"/>
-		<xsd:attribute name="Function" type="xsd:string" use="required"/>
-	</xsd:complexType>
+    <xsd:complexType name="PropertyType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="Name" type="xsd:string" use="required"/>
+                <xsd:attribute name="Value" type="xsd:string" use="optional"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="LayoutImportType">
+        <xsd:attribute name="Filename" type="xsd:string" use="required"/>
+        <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+    </xsd:complexType>
+
+    <xsd:complexType name="EventType">
+        <xsd:attribute name="Name" type="xsd:string" use="required"/>
+        <xsd:attribute name="Function" type="xsd:string" use="required"/>
+    </xsd:complexType>
 
 </xsd:schema>
Index: code/trunk/data/gui/layouts/InGamePickupHUD.layout
===================================================================
--- code/trunk/data/gui/layouts/InGamePickupHUD.layout	(revision 9251)
+++ code/trunk/data/gui/layouts/InGamePickupHUD.layout	(revision 9348)
@@ -2,52 +2,48 @@
 
 <GUILayout>
-	<Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
-		<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="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
-			<Property Name="Font" Value="BlueHighway-12" />
-			<Property Name="Text" Value="Pickup List" />
-			<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-			<Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
-			<Property Name="Alpha" Value="0.3" />
-			<!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
-			<Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
-				<Property Name="Alpha" Value="0.8"/>
-				<Property Name="Text" Value="Pickup List" />
-				<Property Name="Font" Value="BlueHighway-10" />
-				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-				<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
-			</Window>
-			<Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
-			        <Property Name="Alpha" Value="0.8" />
-				<Property Name="Font" Value="BlueHighway-12" />
-				<Property Name="Text" Value="X" />
-				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-				<Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
-				<!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
-				und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
-				<Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
-			</Window>
-			<Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
-			        <Property Name="Alpha" Value="0.8" />
-				<Property Name="Font" Value="BlueHighway-12" />
-				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-				<Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />	
-				<!--
-				<Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
-					<Property Name="Alpha" Value="0.8" />
-					<Property Name="Font" Value="BlueHighway-12" />
-					<Property Name="Text" Value="First Pickup" />
-					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-					<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />	
-				</Window>
-				-->
-			</Window>
-			
-		</Window>
-		
-	
-	</Window>
-	
+    <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
+        <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="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="Text" Value="Pickup List" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
+            <Property Name="Alpha" Value="0.3" />
+            <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
+            <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
+                <Property Name="Alpha" Value="0.8"/>
+                <Property Name="Text" Value="Pickup List" />
+                <Property Name="Font" Value="BlueHighway-10" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
+                <Property Name="Alpha" Value="0.8" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="X" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
+                <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
+                und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
+                <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
+                <Property Name="Alpha" Value="0.8" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />
+                <!--
+                <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
+                    <Property Name="Alpha" Value="0.8" />
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="First Pickup" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />
+                </Window>
+                -->
+            </Window>
+        </Window>
+    </Window>
 </GUILayout>
Index: code/trunk/data/gui/layouts/ShipSelectionMenu.layout
===================================================================
--- code/trunk/data/gui/layouts/ShipSelectionMenu.layout	(revision 9348)
+++ code/trunk/data/gui/layouts/ShipSelectionMenu.layout	(revision 9348)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionBackground" >
+        <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/ShipSelectionWindow" >
+            <Property Name="Text" Value="ShipSelection" />
+            <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.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
+            <Window Type="MenuWidgets/TabControl" Name="orxonox/ShipSelectionTabControl" >
+                <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>
+
+            <!-- TODO: Ship Description and Image
+            <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" >
+                <Property Name="AlwaysOnTop" Value="True" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.25,0},{0.9,0},{0.675,0}}" />
+            </Window>
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionLevelDescription" >
+                <Property Name="AlwaysOnTop" Value="True" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertScrollbar" Value="True" />
+                <Property Name="HorzScrollbar" Value="True" />
+                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
+            </Window>-->
+
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionStartButton" >
+            <Property Name="Text" Value="Start" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionStartButton_clicked"/>
+        </Window>
+        <!-- TODO: set ship properties
+        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
+            <Property Name="Text" Value="Configure" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionConfigButton_clicked"/>
+        </Window> -->
+        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>
Index: code/trunk/data/gui/scripts/AudioMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/AudioMenu.lua	(revision 9251)
+++ code/trunk/data/gui/scripts/AudioMenu.lua	(revision 9348)
@@ -34,4 +34,5 @@
     table.insert(themeList, "8-Bit Style")
     table.insert(themeList, "Corny Jazz")
+    table.insert(themeList, "Metal")
     for k,v in pairs(themeList) do
         item = CEGUI.createListboxTextItem(v)
@@ -45,4 +46,6 @@
     elseif orxonox.getConfig("MoodManager", "mood_") == "jazzy" then
         listboxwindow:setItemSelectState(3,true)
+    elseif orxonox.getConfig("MoodManager", "mood_") == "metal" then
+        listboxwindow:setItemSelectState(4,true)
     else
         listboxwindow:setItemSelectState(0,true)
@@ -178,4 +181,6 @@
     elseif listboxwindow:isItemSelected(3) then
         orxonox.config("MoodManager", "mood_", "jazzy")
+    elseif listboxwindow:isItemSelected(4) then
+        orxonox.config("MoodManager", "mood_", "metal")
     else
         orxonox.config("MoodManager", "mood_", "default")
Index: code/trunk/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/trunk/data/gui/scripts/PickupInventory.lua	(revision 9251)
+++ code/trunk/data/gui/scripts/PickupInventory.lua	(revision 9348)
@@ -108,5 +108,5 @@
 
 function P.createPickupEntry(index, pickup)
-    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
+    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
 
     local name = "orxonox/PickupInventory/Box/Pickup" .. index
@@ -176,5 +176,5 @@
     for k,v in pairs(P.detailsWindows) do
         if v ~= nil then
-            winMgr:destroyWindow(v)
+            P.destroyDetailWindow(k)
         end
     end
@@ -193,5 +193,5 @@
 function P.createDetailsWindow(pickupIndex)
     local pickup = P.pickupsList[pickupIndex]
-    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
+    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
 
     local index = P.getNewDetailNumber()
@@ -323,4 +323,8 @@
     local detailNr = tonumber(match())
     
+    P.destroyDetailWindow(detailNr)
+end
+
+function P.destroyDetailWindow(detailNr)
     local window = P.detailsWindows[detailNr]
     winMgr:destroyWindow(window)
Index: code/trunk/data/gui/scripts/ShipSelectionMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/ShipSelectionMenu.lua	(revision 9348)
+++ code/trunk/data/gui/scripts/ShipSelectionMenu.lua	(revision 9348)
@@ -0,0 +1,132 @@
+-- ShipSelectionMenu.lua
+
+local P = createMenuSheet("ShipSelectionMenu")
+P.activeTabIndexes = {}
+P.scrollbarWidth = 13
+P.shipList = {}
+function P.onLoad()
+    orxonox.execute("set shipmodelsfile [open {../levels/templates/.shipmodels} w+]")
+    orxonox.execute("foreach line [glob -directory ../levels/templates/ spaceship*] { regexp {.*/(.*)\\..*} $line matchall match1; puts $shipmodelsfile $match1 }")
+    orxonox.execute("close $shipmodelsfile")
+    P.createFilterTab("All Ships")
+end
+
+function P.createShipList() --generates list with tagged shipmodels
+    P.shipList = {}
+    file = io.open("../levels/templates/.shipmodels")
+    if file ~= nil then
+        for line in file:lines() do  --checks if shipmodel is included in level file
+            if selectedlevel:hasStartingShip(string.lower(line)) then
+                P.shipList[#P.shipList+1] = string.lower(line)
+            end
+        end
+        --file.close() -- TODO: investigate why close() seems to crash?
+    end
+end
+
+function P.update() --updates listbox with found models
+    P.createShipList()
+    listbox:resetList()
+    --orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
+    local tabIndexes = {}
+    for k,v in pairs(P.shipList) do
+        --TODO: only add ship if is in the right filter tab
+        --if tag == nil or v:hasStartingShip(tag) then
+            local item = CEGUI.createListboxTextItem(v)
+            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            listbox:addItem(item)
+            table.insert(tabIndexes, k)
+            --orxonox.GUIManager:setTooltipTextHelper(item, v:getDescription())
+        --end
+    end
+    table.insert(P.activeTabIndexes, tabIndexes)
+end
+
+function P.createFilterTab(name) -- generates filter tab and list box, sets handler for selection changes
+    tabName = "orxonox/ShipSelectionLevelTab"
+    -- create new tab window with desired name
+    listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
+    listbox:setText(name)
+    listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
+    --[[TODO: smaller list if image and description is implemented.
+    listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
+    listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
+    -- fill listbox with items
+    P.update()
+    -- listen to selection changes
+    orxonox.GUIManager:subscribeEventHelper(listbox, "ItemSelectionChanged", P.name..".ShipSelectionSelectionChanged")
+    local tabControl = winMgr:getWindow("orxonox/ShipSelectionTabControl")
+    orxonox.GUIManager:subscribeEventHelper(tabControl, "TabSelectionChanged", P.name..".ShipSelectionSelectionChanged")
+    if listbox:getItemCount() > 0 then
+        tabControl:addChildWindow(tabName)
+    end
+end
+
+function P.ShipSelectionGetSelectedModel() --returns selected model, if available.
+    -- choose the active listbox
+    local tabControl = CEGUI.toTabControl(winMgr:getWindow("orxonox/ShipSelectionTabControl"))
+    local listbox = CEGUI.toListbox(tabControl:getTabContentsAtIndex(tabControl:getSelectedTabIndex()))
+    local choice = listbox:getFirstSelectedItem()
+    if choice ~= nil then
+        -- get the right tab and the right index
+        local tabIndexes = P.activeTabIndexes[tabControl:getSelectedTabIndex()+1]
+        local index = tabIndexes[listbox:getItemIndex(choice)+1]
+        return P.shipList[index]
+    else
+        return nil
+    end
+end
+
+function P.ShipSelectionSelectionChanged(e)
+    --[[ TODO: Get image and description from template file
+    local levelImage = winMgr:getWindow("orxonox/ShipSelectionLevelImage")
+    local levelDescription = winMgr:getWindow("orxonox/ShipSelectionLevelDescription")
+    local configButton = winMgr:getWindow("orxonox/ShipSelectionConfigButton")
+    local level = P.ShipSelectionGetSelectedModel()
+    if level ~= nil then
+        --local levelXMLFilename = selectedlevel:getXMLFilename()
+        --local imageName = selectedlevel:getScreenshot()
+        -- set the screenshot and the description for the selected level
+        --levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
+        --levelDescription:setText(level:getDescription())
+        -- only enable config button for "gametype" levels
+        --if level:hasTag("gametype") then
+         --   configButton:setProperty("Disabled", "False")
+        --else
+        --    configButton:setProperty("Disabled", "True")
+        --end
+    else
+        -- also take care of "no level selected"
+        levelImage:setProperty("Image", nil)
+        levelDescription:setText("")
+    end
+   --]]
+end
+
+function P.ShipSelectionStartButton_clicked(e)
+
+    if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil)  then
+    selectedlevel:selectStartingShip(P.ShipSelectionGetSelectedModel())
+        orxonox.execute("startGame " .. "_temp.oxw")
+        hideAllMenuSheets()
+    else
+    orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed")
+    end
+end
+
+--[[ TODO: function P.ShipSelectionConfigButton_clicked(e)
+
+    local level = P.ShipSelectionGetSelectedModel()
+    if level ~= nil then
+        local configMenu = showMenuSheet("ShipSelectionConfigMenu")
+        configMenu:loadConfig(level)
+    end
+end
+--]]
+
+
+function P.ShipSelectionBackButton_clicked(e)
+    orxonox.execute("keyESC")
+end
+
+return P
Index: code/trunk/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 9251)
+++ code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 9348)
@@ -2,12 +2,13 @@
 
 local P = createMenuSheet("SingleplayerMenu")
-
+P.loadAlong = {"ShipSelectionMenu"}
 P.levelList = {}
 P.activeTabIndexes = {}
 P.scrollbarWidth = 13
+selectedlevel = {} -- level for ship selection
 
 function P.onLoad()
     P.createLevelList()
-    
+
     -- create tabs with desired tab as argument (nil for all)
     P.createFilterTab("Gametypes", "gametype")
@@ -18,8 +19,8 @@
     P.createFilterTab("Tests", "test")
     P.createFilterTab("Show All", nil)
-    
+
     -- update description and screenshot boxes
     P.SingleplayerSelectionChanged()
-    
+
     --buttons are arranged in a 1x3 matrix
     P:setButton(1, 1, {
@@ -46,5 +47,5 @@
     while index < size do
         level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
-        if level ~= nil then
+        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
             local levelXMLFilename = level:getXMLFilename()
             -- create an imageset for each screenshot
@@ -141,8 +142,13 @@
 
 function P.SingleplayerStartButton_clicked(e)
-    local level = P.SingleplayerGetSelectedLevel()
-    if level ~= nil then
-        orxonox.execute("startGame " .. level:getXMLFilename())
-        hideAllMenuSheets()
+    selectedlevel = P.SingleplayerGetSelectedLevel()
+    if selectedlevel ~= nil then
+        if selectedlevel:hasTag("shipselection") then
+            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
+            shipSelectionMenu:update()
+        else
+            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
+            hideAllMenuSheets()
+        end
     end
 end
