Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9045


Ignore:
Timestamp:
Mar 16, 2012, 4:54:46 PM (12 years ago)
Author:
huttemat
Message:

added wip ship selection menu

Location:
code/branches/shipSelection
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shipSelection/data/gui/layouts/ShipSelectionMenu.layout

    r9039 r9045  
    22
    33<GUILayout >
    4     <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerBackground" >
     4
     5    <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionBackground" >
    56        <Property Name="FrameEnabled" Value="False" />
    67        <Property Name="InheritsAlpha" Value="False" />
     
    89        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    910        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerWindow" >
    11             <Property Name="Text" Value="Singleplayer" />
     11        <!-- -->
     12        <Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionWindow" >
     13            <Property Name="Text" Value="ShipSelection" />
    1214            <Property Name="Alpha" Value="0.8" />
    1315            <Property Name="InheritsAlpha" Value="False" />
     
    1618            <Property Name="VertFormatting" Value="TopAligned" />
    1719            <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
    18             <Window Type="MenuWidgets/TabControl" Name="orxonox/SingleplayerTabControl" >
     20                <!--
     21            <Window Type="MenuWidgets/TabControl" Name="orxonox/ShipSelectionTabControl" >
    1922                <Property Name="TabHeight" Value="{0,26.4388}" />
    2023                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2225                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
    2326            </Window>
    24             <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerLevelImage" >
     27                -->
     28            <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionLevelImage" >
    2529                <Property Name="AlwaysOnTop" Value="True" />
    2630                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2731                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.25,0},{0.9,0},{0.675,0}}" />
    2832            </Window>
    29             <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerLevelDescription" >
     33            <Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionLevelDescription" >
    3034                <Property Name="AlwaysOnTop" Value="True" />
    3135                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3438                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
    3539            </Window>
     40                 
    3641        </Window>
    37         <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerStartButton" >
     42        <!-- -->
     43        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionStartButton" >
    3844            <Property Name="Text" Value="Start" />
    3945            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    4046            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
    41             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
     47            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionStartButton_clicked"/>
    4248        </Window>
    43         <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigButton" >
     49        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
    4450            <Property Name="Text" Value="Configure" />
    4551            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    4652            <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
    4753            <Property Name="Disabled" Value="True" />
    48             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
     54            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionConfigButton_clicked"/>
    4955        </Window>
    50         <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
     56        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionBackButton" >
    5157            <Property Name="Text" Value="Back" />
    5258            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    5359            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
    54             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/>
     60            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionBackButton_clicked"/>
    5561        </Window>
    5662    </Window>
  • code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua

    r9039 r9045  
    22
    33local P = createMenuSheet("SingleplayerMenu")
    4 P.loadAlong = { "ShipSelectionMenu"}
     4P.loadAlong = {"ShipSelectionMenu"}
    55P.levelList = {}
    66P.activeTabIndexes = {}
     
    143143    local level = P.SingleplayerGetSelectedLevel()
    144144    if level ~= nil then
    145         if level:hasTag("shipselection") then
    146             showMenuSheet("ShipSelectionMenu", true)
     145
     146        if level:hasTag("shipselection") then
     147            showMenuSheet("ShipSelectionMenu", true)
     148        else
     149            orxonox.execute("startGame " .. level:getXMLFilename())
     150            hideAllMenuSheets()
    147151        end
    148         orxonox.execute("startGame " .. level:getXMLFilename())
    149         hideAllMenuSheets()
    150152    end
    151153end
  • code/branches/shipSelection/src/orxonox/LevelInfo.cc

    r9016 r9045  
    9393            LevelInfoItem::possibleTags_s.insert("gametype");
    9494            LevelInfoItem::possibleTags_s.insert("minigame");
     95            LevelInfoItem::possibleTags_s.insert("shipselection");
    9596        }
    9697    }
Note: See TracChangeset for help on using the changeset viewer.