Changeset 7916 for code/branches/usability
- Timestamp:
- Feb 19, 2011, 5:05:08 PM (14 years ago)
- Location:
- code/branches/usability/data/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/configs/CEGUIConfig.xsd
r5781 r7916 2 2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 3 3 4 4 <xsd:element name="CEGUIConfig" type="CEGUIConfigType"/> 5 5 6 6 <xsd:simpleType name="LogLevel"> … … 12 12 </xsd:restriction> 13 13 </xsd:simpleType> 14 15 16 17 18 19 20 21 22 14 15 <xsd:complexType name="CEGUIConfigType"> 16 <xsd:attribute name="Logfile" type="xsd:string" use="optional" default=""/> 17 <xsd:attribute name="Scheme" type="xsd:string" use="optional" default=""/> 18 <xsd:attribute name="DefaultFont" type="xsd:string" use="optional" default=""/> 19 <xsd:attribute name="Layout" type="xsd:string" use="optional" default=""/> 20 <xsd:attribute name="InitScript" type="xsd:string" use="optional" default=""/> 21 <xsd:attribute name="TerminateScript" type="xsd:string" use="optional" default=""/> 22 <xsd:attribute name="DefaultResourceGroup" type="xsd:string" use="optional" default="" /> 23 23 <xsd:attribute name="LoggingLevel" type="LogLevel" use="optional" default="Standard" /> 24 25 24 </xsd:complexType> 25 26 26 </xsd:schema> 27 27 -
code/branches/usability/data/gui/schemes/GUIScheme.xsd
r5781 r7916 1 1 <?xml version="1.0" ?> 2 2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 3 4 3 <xsd:element name="GUIScheme" type="SchemeType" /> 4 <xsd:complexType name="SchemeType"> 5 5 <xsd:choice minOccurs="0" maxOccurs="unbounded"> 6 6 <xsd:element name="Imageset" type="NamedDataType" /> 7 7 <xsd:element name="ImagesetFromImage" type="NamedDataType" /> 8 8 <xsd:element name="Font" type="NamedDataType" /> 9 9 <xsd:element name="LookNFeel" type="FileDataType" /> 10 11 12 10 <xsd:element name="WindowSet" type="WindowSetType" /> 11 <xsd:element name="WindowRendererSet" type="WindowRendererSetType" /> 12 <xsd:element name="WindowAlias" type="WindowAliasType" /> 13 13 <xsd:element name="FalagardMapping" type="FalagardMapType" /> 14 15 16 17 18 14 </xsd:choice> 15 <xsd:attribute name="Name" type="xsd:string" use="required" /> 16 </xsd:complexType> 17 <xsd:complexType name="WindowSetType"> 18 <xsd:sequence> 19 19 <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" /> 20 21 22 23 24 20 </xsd:sequence> 21 <xsd:attribute name="Filename" type="xsd:string" use="required" /> 22 </xsd:complexType> 23 <xsd:complexType name="WindowRendererSetType"> 24 <xsd:sequence> 25 25 <xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" /> 26 27 28 26 </xsd:sequence> 27 <xsd:attribute name="Filename" type="xsd:string" use="required" /> 28 </xsd:complexType> 29 29 <xsd:complexType name="FileDataType"> 30 30 <xsd:attribute name="Filename" type="xsd:string" use="required" /> 31 31 <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> 32 32 </xsd:complexType> 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 33 <xsd:complexType name="NamedDataType"> 34 <xsd:attribute name="Name" type="xsd:string" use="required" /> 35 <xsd:attribute name="Filename" type="xsd:string" use="required" /> 36 <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> 37 </xsd:complexType> 38 <xsd:complexType name="WindowFactoryType"> 39 <xsd:attribute name="Name" type="xsd:string" use="required" /> 40 </xsd:complexType> 41 <xsd:complexType name="WindowRendererFactoryType"> 42 <xsd:attribute name="Name" type="xsd:string" use="required" /> 43 </xsd:complexType> 44 <xsd:complexType name="WindowAliasType"> 45 <xsd:attribute name="Alias" type="xsd:string" use="required" /> 46 <xsd:attribute name="Target" type="xsd:string" use="required" /> 47 </xsd:complexType> 48 48 <xsd:complexType name="FalagardMapType"> 49 49 <xsd:attribute name="WindowType" type="xsd:string" use="required" /> 50 50 <xsd:attribute name="TargetType" type="xsd:string" use="required" /> 51 51 <xsd:attribute name="Renderer" type="xsd:string" use="required" /> 52 52 <xsd:attribute name="LookNFeel" type="xsd:string" use="required" /> 53 53 </xsd:complexType> -
code/branches/usability/data/gui/schemes/OrxonoxLook.scheme
r7887 r7916 1 1 <?xml version="1.0" ?> 2 2 <GUIScheme Name="OrxonoxLook"> 3 4 5 3 <Imageset Name="OrxonoxLook" Filename="OrxonoxLook.imageset" /> 4 <LookNFeel Filename="OrxonoxLook.looknfeel" /> 5 <WindowRendererSet Filename="CEGUIFalagardWRBase" /> 6 6 7 7 <!-- Standard widgets --> … … 45 45 <FalagardMapping WindowType="OrxonoxLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="OrxonoxLook/Tooltip" /> 46 46 <FalagardMapping WindowType="OrxonoxLook/Tree" TargetType="CEGUI/Tree" Renderer="Falagard/Tree" LookNFeel="OrxonoxLook/Tree" /> 47 47 48 48 <!-- Additional widgets --> 49 49 <FalagardMapping WindowType="OrxonoxLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="OrxonoxLook/AltProgressBar" /> -
code/branches/usability/data/gui/schemes/TaharezGreenLook.scheme
r6746 r7916 1 1 <?xml version="1.0" ?> 2 2 <GUIScheme Name="TaharezGreenLook"> 3 4 5 3 <Imageset Name="TaharezGreenLook" Filename="TaharezGreenLook.imageset" /> 4 <LookNFeel Filename="TaharezGreenLook.looknfeel" /> 5 <WindowRendererSet Filename="CEGUIFalagardWRBase" /> 6 6 7 7 <!-- Standard widgets --> … … 45 45 <FalagardMapping WindowType="TaharezGreenLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="TaharezGreenLook/Tooltip" /> 46 46 <FalagardMapping WindowType="TaharezGreenLook/Tree" TargetType="CEGUI/Tree" Renderer="Falagard/Tree" LookNFeel="TaharezGreenLook/Tree" /> 47 47 48 48 <!-- Additional widgets --> 49 49 <FalagardMapping WindowType="TaharezGreenLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezGreenLook/AltProgressBar" /> -
code/branches/usability/data/gui/schemes/TaharezLook.scheme
r6746 r7916 1 1 <?xml version="1.0" ?> 2 2 <GUIScheme Name="TaharezLook"> 3 4 5 3 <Imageset Name="TaharezLook" Filename="TaharezLook.imageset" /> 4 <LookNFeel Filename="TaharezLook.looknfeel" /> 5 <WindowRendererSet Filename="CEGUIFalagardWRBase" /> 6 6 7 7 <!-- Standard widgets --> … … 45 45 <FalagardMapping WindowType="TaharezLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="TaharezLook/Tooltip" /> 46 46 <FalagardMapping WindowType="TaharezLook/Tree" TargetType="CEGUI/Tree" Renderer="Falagard/Tree" LookNFeel="TaharezLook/Tree" /> 47 47 48 48 <!-- Additional widgets --> 49 49 <FalagardMapping WindowType="TaharezLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/AltProgressBar" /> -
code/branches/usability/data/gui/scripts/MultiplayerMenu.lua
r7876 r7916 10 10 11 11 function P.onLoad() 12 P.multiplayerMode = "startClient" 12 P.multiplayerMode = "startClient" 13 13 14 14 --button are arranged in a 2x2 matrix, the left lower item is nil … … 38 38 P.oldindex = -2 39 39 P.index = -1 40 40 41 41 if P.joinMode == 1 then 42 42 local window = winMgr:getWindow("orxonox/MultiplayerLanButton") … … 56 56 P.joinMode = 1 57 57 if button:isSelected() == true then 58 58 P.showServerList() 59 59 end 60 60 end … … 65 65 P.joinMode = 2 66 66 if button:isSelected() == true then 67 68 67 P.showServerList() 68 end 69 69 end 70 70 … … 92 92 93 93 function P.showServerList() 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 94 -- LAN Discovery 95 if P.joinMode == 1 then 96 local listbox = winMgr:getWindow("orxonox/MultiplayerListbox") 97 CEGUI.toListbox(listbox):resetList() 98 local discovery = orxonox.LANDiscovery:getInstance() 99 discovery:discover() 100 P.serverList = {} 101 local index = 0 102 local servername = "" 103 local serverip = "" 104 while true do 105 servername = discovery:getServerListItemName(index) 106 if servername == "" then 107 break 108 end 109 serverip = discovery:getServerListItemIP(index) 110 if serverip == "" then 111 break 112 end 113 table.insert(P.serverList, {servername, serverip}) 114 index = index + 1 115 end 116 index = 1 117 for k,v in pairs(P.serverList) do 118 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] ) 119 item:setID(index) 120 index = index + 1 121 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 122 CEGUI.toListbox(listbox):addItem(item) 123 end 124 -- WAN Discovery 125 elseif P.joinMode == 2 then 126 local listbox = winMgr:getWindow("orxonox/MultiplayerListbox") 127 CEGUI.toListbox(listbox):resetList() 128 local discovery = orxonox.WANDiscovery:getInstance() 129 cout(0, "discovering.\n" ) 130 discovery:discover() 131 cout(0, "discovered.\n" ) 132 P.serverList = {} 133 local index = 0 134 local servername = "" 135 local serverip = "" 136 while true do 137 servername = discovery:getServerListItemName(index) 138 if servername == "" then 139 break 140 end 141 serverip = discovery:getServerListItemIP(index) 142 if serverip == "" then 143 break 144 end 145 table.insert(P.serverList, {servername, serverip}) 146 index = index + 1 147 end 148 index = 1 149 for k,v in pairs(P.serverList) do 150 local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] ) 151 item:setID(index) 152 index = index + 1 153 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 154 CEGUI.toListbox(listbox):addItem(item) 155 end 156 end 157 158 158 end 159 159 160 function P.onKeyPressed() 160 function P.onKeyPressed() 161 161 buttonIteratorHelper(P.buttonList, code, P, 2, 2) 162 162 end
Note: See TracChangeset
for help on using the changeset viewer.