[Orxonox-commit 4375] r9046 - in code/branches/shipSelection/data: gui/scripts levels
huttemat at orxonox.net
huttemat at orxonox.net
Sat Mar 17 19:19:14 CET 2012
Author: huttemat
Date: 2012-03-17 19:19:14 +0100 (Sat, 17 Mar 2012)
New Revision: 9046
Modified:
code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua
code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua
code/branches/shipSelection/data/levels/tutorial.oxw
Log:
test
Modified: code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua
===================================================================
--- code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua 2012-03-16 15:54:46 UTC (rev 9045)
+++ code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua 2012-03-17 18:19:14 UTC (rev 9046)
@@ -1,10 +1,13 @@
-- ShipSelectionMenu.lua
local P = createMenuSheet("ShipSelectionMenu")
-P.levelList = {}
+level = nil
P.activeTabIndexes = {}
P.scrollbarWidth = 13
-
+function P.loadShips(levelname)
+ --orxonox.execute("echo " .. levelname)
+ --level = levelname
+end
function P.onLoad()
--[[ P.createLevelList()
@@ -139,19 +142,13 @@
end
--]]
function P.ShipSelectionStartButton_clicked(e)
---[[
- local level = P.ShipSelectionGetSelectedLevel()
- if level ~= nil then
- if level:hasTag("shipselection") then
- orxout("working!")
- showMenuSheet("ShipSelectionMenu", true)
- else
- orxonox.execute("startGame " .. level:getXMLFilename())
- hideAllMenuSheets()
- end
+ if P.level ~= nil then
+ orxonox.execute("startGame " .. level:getXMLFilename())
+ hideAllMenuSheets()
+ else
+ orxonox.execute("keyESC")
end
---]]
end
function P.ShipSelectionConfigButton_clicked(e)
@@ -165,7 +162,7 @@
end
function P.ShipSelectionBackButton_clicked(e)
- --hideMenuSheet(P.name)
+ orxonox.execute("keyESC")
end
return P
Modified: code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua 2012-03-16 15:54:46 UTC (rev 9045)
+++ code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua 2012-03-17 18:19:14 UTC (rev 9046)
@@ -144,7 +144,8 @@
if level ~= nil then
if level:hasTag("shipselection") then
- showMenuSheet("ShipSelectionMenu", true)
+ local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
+ shipSelectionMenu:loadShips(level:getXMLFilename())
else
orxonox.execute("startGame " .. level:getXMLFilename())
hideAllMenuSheets()
Modified: code/branches/shipSelection/data/levels/tutorial.oxw
===================================================================
--- code/branches/shipSelection/data/levels/tutorial.oxw 2012-03-16 15:54:46 UTC (rev 9045)
+++ code/branches/shipSelection/data/levels/tutorial.oxw 2012-03-17 18:19:14 UTC (rev 9046)
@@ -52,7 +52,7 @@
<?lua
for i = 1, 10, 1 do
?>
- <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+ <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=shipselection />
<?lua end ?>
<GlobalShader compositor="Bloom" visible=false>
More information about the Orxonox-commit
mailing list