[Orxonox-commit 4368] r9039 - in code/branches/shipSelection/data: gui/layouts gui/scripts levels

huttemat at orxonox.net huttemat at orxonox.net
Fri Mar 16 15:33:05 CET 2012


Author: huttemat
Date: 2012-03-16 15:33:05 +0100 (Fri, 16 Mar 2012)
New Revision: 9039

Added:
   code/branches/shipSelection/data/gui/layouts/ShipSelectionMenu.layout
Modified:
   code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua
   code/branches/shipSelection/data/levels/tutorial.oxw
Log:
Added ShipSelectionMenu.layout

Added: code/branches/shipSelection/data/gui/layouts/ShipSelectionMenu.layout
===================================================================
--- code/branches/shipSelection/data/gui/layouts/ShipSelectionMenu.layout	                        (rev 0)
+++ code/branches/shipSelection/data/gui/layouts/ShipSelectionMenu.layout	2012-03-16 14:33:05 UTC (rev 9039)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerBackground" >
+        <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/SingleplayerWindow" >
+            <Property Name="Text" Value="Singleplayer" />
+            <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/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 Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerLevelImage" >
+                <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/SingleplayerLevelDescription" >
+                <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/SingleplayerStartButton" >
+            <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="SingleplayerMenu.SingleplayerStartButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigButton" >
+            <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="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
+            <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="SingleplayerMenu.SingleplayerBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Modified: code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua	2012-03-16 14:22:27 UTC (rev 9038)
+++ code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua	2012-03-16 14:33:05 UTC (rev 9039)
@@ -1,7 +1,7 @@
 -- SingleplayerMenu.lua
 
 local P = createMenuSheet("SingleplayerMenu")
-
+P.loadAlong = { "ShipSelectionMenu"}
 P.levelList = {}
 P.activeTabIndexes = {}
 P.scrollbarWidth = 13
@@ -142,6 +142,9 @@
 function P.SingleplayerStartButton_clicked(e)
     local level = P.SingleplayerGetSelectedLevel()
     if level ~= nil then
+	if level:hasTag("shipselection") then
+	    showMenuSheet("ShipSelectionMenu", true)
+	end
         orxonox.execute("startGame " .. level:getXMLFilename())
         hideAllMenuSheets()
     end

Modified: code/branches/shipSelection/data/levels/tutorial.oxw
===================================================================
--- code/branches/shipSelection/data/levels/tutorial.oxw	2012-03-16 14:22:27 UTC (rev 9038)
+++ code/branches/shipSelection/data/levels/tutorial.oxw	2012-03-16 14:33:05 UTC (rev 9039)
@@ -1,7 +1,7 @@
 <LevelInfo
  name = "Coding Tutorial"
  description = "Level for the coding tutorial."
- tags = "tutorial"
+ tags = "tutorial, shipselection"
  screenshot = "codingtutorial.png"
 />
 




More information about the Orxonox-commit mailing list