Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9348 for code/trunk/data/gui


Ignore:
Timestamp:
Aug 30, 2012, 11:08:17 PM (12 years ago)
Author:
landauf
Message:

merged branch presentation2012merge back to trunk

Location:
code/trunk
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/layouts/GUILayout.xsd

    r5781 r9348  
    22<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    33
    4         <xsd:element name="GUILayout" type="GUILayoutType"/>
    5        
    6         <xsd:complexType name="GUILayoutType">
    7                 <xsd:sequence>
    8                         <xsd:element name="Window" type="WindowType" />
    9                 </xsd:sequence>
    10                 <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
    11         </xsd:complexType>
    12        
    13         <xsd:complexType name="WindowType">
    14                 <xsd:sequence>
    15                         <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
    16                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    17                         <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
    18                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
    19                                 <xsd:element name="Window" type="WindowType" />
    20                                 <xsd:element name="AutoWindow" type="AutoWindowType" />
    21                         </xsd:choice>
    22                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    23                 </xsd:sequence>
    24                 <xsd:attribute name="Type" type="xsd:string" use="required"/>
    25                 <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
    26         </xsd:complexType>
     4    <xsd:element name="GUILayout" type="GUILayoutType"/>
    275
    28         <xsd:complexType name="AutoWindowType">
    29                 <xsd:sequence>
    30                         <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
    31                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    32                         <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
    33                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
    34                                 <xsd:element name="Window" type="WindowType" />
    35                                 <xsd:element name="AutoWindow" type="AutoWindowType" />
    36                         </xsd:choice>
    37                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    38                 </xsd:sequence>
    39                 <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
    40         </xsd:complexType>
     6    <xsd:complexType name="GUILayoutType">
     7        <xsd:sequence>
     8            <xsd:element name="Window" type="WindowType" />
     9        </xsd:sequence>
     10        <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
     11    </xsd:complexType>
    4112
    42         <xsd:complexType name="PropertyType">
    43                 <xsd:simpleContent>
    44                         <xsd:extension base="xsd:string">
    45                                 <xsd:attribute name="Name" type="xsd:string" use="required"/>
    46                                 <xsd:attribute name="Value" type="xsd:string" use="optional"/>
    47                         </xsd:extension>
    48                 </xsd:simpleContent>
    49         </xsd:complexType>
     13    <xsd:complexType name="WindowType">
     14        <xsd:sequence>
     15            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
     16            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     17            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
     18            <xsd:choice minOccurs="0" maxOccurs="unbounded">
     19                <xsd:element name="Window" type="WindowType" />
     20                <xsd:element name="AutoWindow" type="AutoWindowType" />
     21            </xsd:choice>
     22            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     23        </xsd:sequence>
     24        <xsd:attribute name="Type" type="xsd:string" use="required"/>
     25        <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
     26    </xsd:complexType>
    5027
    51         <xsd:complexType name="LayoutImportType">
    52                 <xsd:attribute name="Filename" type="xsd:string" use="required"/>
    53                 <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
    54                 <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
    55         </xsd:complexType>
     28    <xsd:complexType name="AutoWindowType">
     29        <xsd:sequence>
     30            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
     31            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     32            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
     33            <xsd:choice minOccurs="0" maxOccurs="unbounded">
     34                <xsd:element name="Window" type="WindowType" />
     35                <xsd:element name="AutoWindow" type="AutoWindowType" />
     36            </xsd:choice>
     37            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     38        </xsd:sequence>
     39        <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
     40    </xsd:complexType>
    5641
    57         <xsd:complexType name="EventType">
    58                 <xsd:attribute name="Name" type="xsd:string" use="required"/>
    59                 <xsd:attribute name="Function" type="xsd:string" use="required"/>
    60         </xsd:complexType>
     42    <xsd:complexType name="PropertyType">
     43        <xsd:simpleContent>
     44            <xsd:extension base="xsd:string">
     45                <xsd:attribute name="Name" type="xsd:string" use="required"/>
     46                <xsd:attribute name="Value" type="xsd:string" use="optional"/>
     47            </xsd:extension>
     48        </xsd:simpleContent>
     49    </xsd:complexType>
     50
     51    <xsd:complexType name="LayoutImportType">
     52        <xsd:attribute name="Filename" type="xsd:string" use="required"/>
     53        <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
     54        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
     55    </xsd:complexType>
     56
     57    <xsd:complexType name="EventType">
     58        <xsd:attribute name="Name" type="xsd:string" use="required"/>
     59        <xsd:attribute name="Function" type="xsd:string" use="required"/>
     60    </xsd:complexType>
    6161
    6262</xsd:schema>
  • code/trunk/data/gui/layouts/InGamePickupHUD.layout

    r7163 r9348  
    22
    33<GUILayout>
    4         <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
    5                 <Property Name="InheritsAlpha" Value="False" />
    6                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    7                 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8                 <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
    9                         <Property Name="Font" Value="BlueHighway-12" />
    10                         <Property Name="Text" Value="Pickup List" />
    11                         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    12                         <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
    13                         <Property Name="Alpha" Value="0.3" />
    14                         <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
    15                         <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
    16                                 <Property Name="Alpha" Value="0.8"/>
    17                                 <Property Name="Text" Value="Pickup List" />
    18                                 <Property Name="Font" Value="BlueHighway-10" />
    19                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    20                                 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
    21                         </Window>
    22                         <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
    23                                 <Property Name="Alpha" Value="0.8" />
    24                                 <Property Name="Font" Value="BlueHighway-12" />
    25                                 <Property Name="Text" Value="X" />
    26                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    27                                 <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
    28                                 <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
    29                                 und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
    30                                 <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
    31                         </Window>
    32                         <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
    33                                 <Property Name="Alpha" Value="0.8" />
    34                                 <Property Name="Font" Value="BlueHighway-12" />
    35                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    36                                 <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />       
    37                                 <!--
    38                                 <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
    39                                         <Property Name="Alpha" Value="0.8" />
    40                                         <Property Name="Font" Value="BlueHighway-12" />
    41                                         <Property Name="Text" Value="First Pickup" />
    42                                         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    43                                         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" /> 
    44                                 </Window>
    45                                 -->
    46                         </Window>
    47                        
    48                 </Window>
    49                
    50        
    51         </Window>
    52        
     4    <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
     5        <Property Name="InheritsAlpha" Value="False" />
     6        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     7        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     8        <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
     9            <Property Name="Font" Value="BlueHighway-12" />
     10            <Property Name="Text" Value="Pickup List" />
     11            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12            <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
     13            <Property Name="Alpha" Value="0.3" />
     14            <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
     15            <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
     16                <Property Name="Alpha" Value="0.8"/>
     17                <Property Name="Text" Value="Pickup List" />
     18                <Property Name="Font" Value="BlueHighway-10" />
     19                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     20                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
     21            </Window>
     22            <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
     23                <Property Name="Alpha" Value="0.8" />
     24                <Property Name="Font" Value="BlueHighway-12" />
     25                <Property Name="Text" Value="X" />
     26                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     27                <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
     28                <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
     29                und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
     30                <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
     31            </Window>
     32            <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
     33                <Property Name="Alpha" Value="0.8" />
     34                <Property Name="Font" Value="BlueHighway-12" />
     35                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     36                <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />
     37                <!--
     38                <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
     39                    <Property Name="Alpha" Value="0.8" />
     40                    <Property Name="Font" Value="BlueHighway-12" />
     41                    <Property Name="Text" Value="First Pickup" />
     42                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     43                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />
     44                </Window>
     45                -->
     46            </Window>
     47        </Window>
     48    </Window>
    5349</GUILayout>
  • code/trunk/data/gui/layouts/SingleplayerConfigMenu.layout

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/AudioMenu.lua

    r8351 r9348  
    3434    table.insert(themeList, "8-Bit Style")
    3535    table.insert(themeList, "Corny Jazz")
     36    table.insert(themeList, "Metal")
    3637    for k,v in pairs(themeList) do
    3738        item = CEGUI.createListboxTextItem(v)
     
    4546    elseif orxonox.getConfig("MoodManager", "mood_") == "jazzy" then
    4647        listboxwindow:setItemSelectState(3,true)
     48    elseif orxonox.getConfig("MoodManager", "mood_") == "metal" then
     49        listboxwindow:setItemSelectState(4,true)
    4750    else
    4851        listboxwindow:setItemSelectState(0,true)
     
    178181    elseif listboxwindow:isItemSelected(3) then
    179182        orxonox.config("MoodManager", "mood_", "jazzy")
     183    elseif listboxwindow:isItemSelected(4) then
     184        orxonox.config("MoodManager", "mood_", "metal")
    180185    else
    181186        orxonox.config("MoodManager", "mood_", "default")
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r7504 r9348  
    108108
    109109function P.createPickupEntry(index, pickup)
    110     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     110    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    111111
    112112    local name = "orxonox/PickupInventory/Box/Pickup" .. index
     
    176176    for k,v in pairs(P.detailsWindows) do
    177177        if v ~= nil then
    178             winMgr:destroyWindow(v)
     178            P.destroyDetailWindow(k)
    179179        end
    180180    end
     
    193193function P.createDetailsWindow(pickupIndex)
    194194    local pickup = P.pickupsList[pickupIndex]
    195     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     195    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    196196
    197197    local index = P.getNewDetailNumber()
     
    323323    local detailNr = tonumber(match())
    324324   
     325    P.destroyDetailWindow(detailNr)
     326end
     327
     328function P.destroyDetailWindow(detailNr)
    325329    local window = P.detailsWindows[detailNr]
    326330    winMgr:destroyWindow(window)
  • code/trunk/data/gui/scripts/SingleplayerConfigMenu.lua

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r9251 r9348  
    22
    33local P = createMenuSheet("SingleplayerMenu")
    4 
     4P.loadAlong = {"ShipSelectionMenu"}
    55P.levelList = {}
    66P.activeTabIndexes = {}
    77P.scrollbarWidth = 13
     8selectedlevel = {} -- level for ship selection
    89
    910function P.onLoad()
    1011    P.createLevelList()
    11    
     12
    1213    -- create tabs with desired tab as argument (nil for all)
    1314    P.createFilterTab("Gametypes", "gametype")
     
    1819    P.createFilterTab("Tests", "test")
    1920    P.createFilterTab("Show All", nil)
    20    
     21
    2122    -- update description and screenshot boxes
    2223    P.SingleplayerSelectionChanged()
    23    
     24
    2425    --buttons are arranged in a 1x3 matrix
    2526    P:setButton(1, 1, {
     
    4647    while index < size do
    4748        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    48         if level ~= nil then
     49        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
    4950            local levelXMLFilename = level:getXMLFilename()
    5051            -- create an imageset for each screenshot
     
    141142
    142143function P.SingleplayerStartButton_clicked(e)
    143     local level = P.SingleplayerGetSelectedLevel()
    144     if level ~= nil then
    145         orxonox.execute("startGame " .. level:getXMLFilename())
    146         hideAllMenuSheets()
     144    selectedlevel = P.SingleplayerGetSelectedLevel()
     145    if selectedlevel ~= nil then
     146        if selectedlevel:hasTag("shipselection") then
     147            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
     148            shipSelectionMenu:update()
     149        else
     150            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
     151            hideAllMenuSheets()
     152        end
    147153    end
    148154end
Note: See TracChangeset for help on using the changeset viewer.