- Timestamp:
- Oct 27, 2010, 1:11:24 PM (14 years ago)
- Location:
- code/branches/menu/data/gui
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/layouts/MainMenu.layout
r6746 r7587 10 10 <Window Type="MenuWidgets/Button" Name="orxonox/QuickGameTestButton" > 11 11 <Property Name="Text" Value="Quickstart" /> 12 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />13 12 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" /> 14 13 <Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/> -
code/branches/menu/data/gui/layouts/MultiplayerMenu.layout
r7163 r7587 8 8 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 9 9 <Property Name="BackgroundEnabled" Value="False" /> 10 11 10 12 <Window Type="MenuWidgets/StaticText" Name="orxonox/MultiplayerWindow" > 11 13 <Property Name="Text" Value="Multiplayer" /> … … 20 22 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.8,0}}" /> 21 23 </Window> 24 25 </Window> 26 <!-- 27 Die Radiobuttons brauchen wir nicht mehr, dafuer ihre Funktionen. 28 Neue Buttons: 29 >join< >host< 30 31 22 32 <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerJoinButton" > 23 33 <Property Name="Text" Value="Join" /> 24 34 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 25 <Property Name="UnifiedAreaRect" Value="{{0. 1,0},{0.85,0},{0.3,0},{0.95,0}}" />35 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.85,0},{0.4,0},{0.95,0}}" /> 26 36 <Event Name="SelectStateChanged" Function="MultiplayerMenu.MultiplayerJoinButton_clicked"/> 27 37 </Window> 28 38 <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerHostButton" > 29 <Property Name="Text" Value=" Host"/>39 <Property Name="Text" Value="Build Server"/> 30 40 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 31 <Property Name="UnifiedAreaRect" Value="{{0. 4,0},{0.85,0},{0.6,0},{0.95,0}}" />41 <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.85,0},{0.8,0},{0.95,0}}" /> 32 42 <Event Name="SelectStateChanged" Function="MultiplayerMenu.MultiplayerHostButton_clicked"/> 33 43 </Window> … … 38 48 <Event Name="SelectStateChanged" Function="MultiplayerMenu.MultiplayerDedicatedButton_clicked"/> 39 49 </Window> 40 </Window> 50 51 --> 52 53 <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerBackButton" > 54 <Property Name="Text" Value="Back" /> 55 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 56 <Property Name="UnifiedAreaRect" Value="{{0.7125,0},{0.8625,0},{0.9125,0},{0.9125,0}}" /> 57 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerBackButton_clicked"/> 58 </Window> 59 60 <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerJoinButton2" > 61 <Property Name="Text" Value="Join" /> 62 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 63 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" /> 64 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerJoinButton2_clicked"/> 65 </Window> 66 67 <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerHostButton2" > 68 <Property Name="Text" Value="Host" /> 69 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 70 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" /> 71 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerHostButton2_clicked"/> 72 </Window> 73 74 <!-- 75 41 76 <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerStartButton" > 42 77 <Property Name="Text" Value="Start" /> … … 51 86 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerBackButton_clicked"/> 52 87 </Window> 88 89 --> 90 53 91 </Window> 54 92 </GUILayout> 93 -
code/branches/menu/data/gui/scripts/MenuSheet.lua
r7163 r7587 16 16 newSheet.bHidePrevious = handleDefArg(_bHidePrevious, true) 17 17 newSheet.tShowCursor = handleDefArg(_tShowCusor, TriBool.True) 18 newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool. Dontcare)18 newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool.True) 19 19 newSheet.bBlockJoyStick = handleDefArg(_bBlockJoyStick, false) 20 20 -
code/branches/menu/data/gui/scripts/MultiplayerMenu.lua
r7163 r7587 8 8 9 9 function P.onShow() 10 if P.multiplayerMode == "startClient" then 11 local window = winMgr:getWindow("orxonox/MultiplayerJoinButton") 12 local button = tolua.cast(window,"CEGUI::RadioButton") 13 button:setSelected(true) 14 P.showServerList() 15 end 16 if P.multiplayerMode == "startServer" then 17 local window = winMgr:getWindow("orxonox/MultiplayerHostButton") 18 local button = tolua.cast(window,"CEGUI::RadioButton") 19 button:setSelected(true) 20 P.showLevelList() 21 end 22 if P.multiplayerMode == "startDedicated" then 23 local window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton") 24 local button = tolua.cast(window,"CEGUI::RadioButton") 25 button:setSelected(true) 26 P.showLevelList() 27 end 10 P.showServerList() 28 11 end 29 12 … … 43 26 end 44 27 45 function P.MultiplayerStartButton_clicked(e) 28 function P.MultiplayerHostButton2_clicked(e) 29 showMenuSheet("HostMenu", true) 30 end 31 32 33 function P.MultiplayerJoinButton2_clicked(e) 46 34 local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem() 47 if P.multiplayerMode == "startClient" then 48 if choice then 49 local client = orxonox.Client:getInstance() 50 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 51 client:setDestination( P.serverList[index][2], 55556 ) 52 else 53 return 54 end 35 if choice then 36 local client = orxonox.Client:getInstance() 37 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 38 client:setDestination( P.serverList[index][2], 55556 ) 55 39 else 56 if choice then 57 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 58 else 59 return 60 end 40 return 61 41 end 62 orxonox.execute( P.multiplayerMode)42 orxonox.execute("startClient") 63 43 hideAllMenuSheets() 64 44 end
Note: See TracChangeset
for help on using the changeset viewer.