Changeset 11186 for code/branches/bindermFS16/data/gui
- Timestamp:
- May 12, 2016, 4:07:25 PM (9 years ago)
- Location:
- code/branches/bindermFS16/data/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bindermFS16/data/gui/layouts/CampaignMenu.layout
r11180 r11186 13 13 <Property Name="Visible" Value="False"/> 14 14 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 15 <Property Name="UnifiedAreaRect" Value="{{0.01,0},{0. 01,0},{0.3,0},{0.06,0}}" />15 <Property Name="UnifiedAreaRect" Value="{{0.01,0},{0.34,0},{0.3,0},{0.39,0}}" /> 16 16 <Event Name="Clicked" Function="CampaignMenu.Mission1Button_clicked"/> 17 17 </Window> … … 21 21 <Property Name="Visible" Value="False"/> 22 22 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 23 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.18,0},{0.65,0},{0.23,0}}" />24 <Property Name="Disabled" Value="True" 23 <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.26,0},{0.4,0},{0.31,0}}" /> 24 <Property Name="Disabled" Value="True"/> 25 25 <Event Name="Clicked" Function="CampaignMenu.Mission2Button_clicked"/> 26 26 </Window> … … 30 30 <Property Name="Visible" Value="False"/> 31 31 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 32 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.26,0},{0.65,0},{0.31,0}}" />32 <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.42,0},{0.4,0},{0.47,0}}" /> 33 33 <Property Name="Disabled" Value="True" /> 34 34 <Event Name="Clicked" Function="CampaignMenu.Mission3Button_clicked"/> … … 39 39 <Property Name="Visible" Value="False"/> 40 40 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 41 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.34,0},{0.65,0},{0.39,0}}" />41 <Property Name="UnifiedAreaRect" Value="{{0.41,0},{0.26,0},{0.71,0},{0.31,0}}" /> 42 42 <Property Name="Disabled" Value="True" /> 43 43 <Event Name="Clicked" Function="CampaignMenu.Mission4Button_clicked"/> … … 48 48 <Property Name="Visible" Value="False"/> 49 49 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 50 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.42,0},{0.65,0},{0.47,0}}" />50 <Property Name="UnifiedAreaRect" Value="{{0.41,0},{0.42,0},{0.71,0},{0.47,0}}" /> 51 51 <Property Name="Disabled" Value="True" /> 52 52 <Event Name="Clicked" Function="CampaignMenu.Mission5Button_clicked"/> … … 57 57 <Property Name="Visible" Value="False"/> 58 58 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 59 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.50,0},{0.65,0},{0.55,0}}" />59 <Property Name="UnifiedAreaRect" Value="{{0.72,0},{0.10,0},{0.99,0},{0.15,0}}" /> 60 60 <Property Name="Disabled" Value="True" /> 61 61 <Event Name="Clicked" Function="CampaignMenu.Mission6Button_clicked"/> … … 66 66 <Property Name="Visible" Value="False"/> 67 67 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 68 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.58,0},{0.65,0},{0.63,0}}" />68 <Property Name="UnifiedAreaRect" Value="{{0.72,0},{0.18,0},{0.99,0},{0.23,0}}" /> 69 69 <Property Name="Disabled" Value="True" /> 70 70 <Event Name="Clicked" Function="CampaignMenu.Mission7Button_clicked"/> … … 75 75 <Property Name="Visible" Value="False"/> 76 76 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 77 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.66,0},{0.65,0},{0.71,0}}" />77 <Property Name="UnifiedAreaRect" Value="{{0.72,0},{0.50,0},{0.99,0},{0.55,0}}" /> 78 78 <Property Name="Disabled" Value="True" /> 79 79 <Event Name="Clicked" Function="CampaignMenu.Mission8Button_clicked"/> … … 84 84 <Property Name="Visible" Value="False"/> 85 85 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 86 <Property Name="UnifiedAreaRect" Value="{{0. 35,0},{0.74,0},{0.65,0},{0.79,0}}" />86 <Property Name="UnifiedAreaRect" Value="{{0.72,0},{0.58,0},{0.99,0},{0.63,0}}" /> 87 87 <Property Name="Disabled" Value="True" /> 88 88 <Event Name="Clicked" Function="CampaignMenu.Mission9Button_clicked"/> -
code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua
r11180 r11186 26 26 27 27 function P.updateButton(index, button) 28 local lastMission = orxonox.LevelManager:getInstance():getLastWonMission() 29 if (lastMission == "") then 30 else 31 local lastwon =P.getIndexOfLastFinishedMission() 32 orxonox.LevelManager:getInstance():updatewon(lastwon) 33 end 34 28 35 local test =orxonox.LevelManager:getInstance():missionactivate(index) 36 29 37 if (test==1) then 30 38 button:setProperty("Visible", "True") … … 48 56 --end 49 57 50 --function P.getIndexOfLastFinishedMission()51 -- local lastMission = orxonox.LevelManager:getInstance():getLastFinishedCampaignMission()52 --if (lastMission and lastMission ~= "") then53 --local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()54 --local index = 055 --while index < size do56 --local mission = orxonox.LevelManager:getInstance():getCampaignMission(index)57 --if (mission == lastMission) then58 --return index59 --end60 --index = index + 161 --end62 --end63 --return -164 --end58 function P.getIndexOfLastFinishedMission() 59 local lastMission = orxonox.LevelManager:getInstance():getLastWonMission() 60 if (lastMission and lastMission ~= "") then 61 local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() 62 local index = 0 63 while index < size do 64 local mission = orxonox.LevelManager:getInstance():getCampaignMission(index) 65 if (mission == lastMission) then 66 return index 67 end 68 index = index + 1 69 end 70 end 71 return -1 72 end 65 73 66 74 function P.Mission1Button_clicked(e)
Note: See TracChangeset
for help on using the changeset viewer.