Changeset 9272 for code/branches/presentation2012merge/data/gui
- Timestamp:
- Jun 3, 2012, 6:05:24 PM (13 years ago)
- Location:
- code/branches/presentation2012merge/data/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd
r5781 r9272 2 2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 3 3 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"/> 27 5 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> 41 12 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> 50 27 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> 56 41 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> 61 61 62 62 </xsd:schema> -
code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout
r7163 r9272 2 2 3 3 <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> 53 49 </GUILayout> -
code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout
r9271 r9272 9 9 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 10 10 <Property Name="BackgroundEnabled" Value="False" /> 11 <!-- --> 11 <!-- --> 12 12 <Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionWindow" > 13 13 <Property Name="Text" Value="ShipSelection" /> … … 17 17 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 18 <Property Name="VertFormatting" Value="TopAligned" /> 19 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" /> 19 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" /> 20 20 <Window Type="MenuWidgets/TabControl" Name="orxonox/ShipSelectionTabControl" > 21 21 <Property Name="TabHeight" Value="{0,26.4388}" /> 22 22 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 23 23 <Property Name="TabPanePosition" Value="Top" /> 24 25 26 </Window> 27 28 29 24 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" /> 25 26 </Window> 27 28 <!-- TODO: Ship Description and Image 29 <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" > 30 30 <Property Name="AlwaysOnTop" Value="True" /> 31 31 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> … … 38 38 <Property Name="HorzScrollbar" Value="True" /> 39 39 <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" /> 40 </Window>--> 41 40 </Window>--> 41 42 42 </Window> 43 43 <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionStartButton" > … … 48 48 </Window> 49 49 <!-- TODO: set ship properties 50 50 <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" > 51 51 <Property Name="Text" Value="Configure" /> 52 52 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> … … 54 54 <Property Name="Disabled" Value="True" /> 55 55 <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionConfigButton_clicked"/> 56 </Window> --> 56 </Window> --> 57 57 <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionBackButton" > 58 58 <Property Name="Text" Value="Back" /> -
code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua
r9271 r9272 12 12 -- Windows 13 13 dircmd = "dir /b/s" 14 end]] 15 P.createFilterTab("All Ships") 14 end]] 15 P.createFilterTab("All Ships") 16 16 end 17 17 … … 19 19 P.shipList = {} 20 20 for line in io.lines("../levels/templates/.shipmodels") do --checks if shipmodel is included in level file 21 22 23 24 end 21 if selectedlevel:hasShip(string.lower(line)) then 22 P.shipList[#P.shipList+1] = string.lower(line) 23 end 24 end 25 25 end 26 26 … … 46 46 tabName = "orxonox/ShipSelectionLevelTab" 47 47 -- create new tab window with desired name 48 listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName)) 48 listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName)) 49 49 listbox:setText(name) 50 50 listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}") 51 --[[TODO: smaller list if image and description is implemented. 52 listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]] 51 --[[TODO: smaller list if image and description is implemented. 52 listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]] 53 53 listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}") 54 54 -- fill listbox with items … … 107 107 108 108 if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil) then 109 109 selectedlevel:selectShip(P.ShipSelectionGetSelectedModel()) 110 110 orxonox.execute("startGame " .. "_temp.oxw") 111 111 hideAllMenuSheets() 112 112 else 113 113 orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed") 114 114 end 115 115 end … … 128 128 function P.ShipSelectionBackButton_clicked(e) 129 129 orxonox.execute("keyESC") 130 end 130 end 131 131 132 132 return P -
code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua
r9269 r9272 10 10 function P.onLoad() 11 11 P.createLevelList() 12 12 13 13 -- create tabs with desired tab as argument (nil for all) 14 14 P.createFilterTab("Gametypes", "gametype") … … 19 19 P.createFilterTab("Tests", "test") 20 20 P.createFilterTab("Show All", nil) 21 21 22 22 -- update description and screenshot boxes 23 23 P.SingleplayerSelectionChanged() 24 24 25 25 --buttons are arranged in a 1x3 matrix 26 26 P:setButton(1, 1, { … … 48 48 level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index) 49 49 if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then 50 50 --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx") 51 51 local levelXMLFilename = level:getXMLFilename() 52 52 -- create an imageset for each screenshot … … 151 151 orxonox.execute("startGame " .. selectedlevel:getXMLFilename()) 152 152 hideAllMenuSheets() 153 153 end 154 154 end 155 155 end
Note: See TracChangeset
for help on using the changeset viewer.