Changeset 7588 for code/branches/menu/data/gui
- Timestamp:
- Oct 27, 2010, 1:15:28 PM (14 years ago)
- Location:
- code/branches/menu/data/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/layouts/MainMenu.layout
r7587 r7588 43 43 <Event Name="Clicked" Function="MainMenu.ExitButton_clicked"/> 44 44 </Window> 45 <Event Name="KeyDown" Function="MainMenu.Key_clicked"/> 45 46 </Window> 46 47 </GUILayout> -
code/branches/menu/data/gui/layouts/MainMenuBackground.layout
r6746 r7588 2 2 <GUILayout> 3 3 <Window Type="MenuWidgets/StaticImage" Name="orxonox/Background"> 4 <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>5 <Property Name="Image" Value="set:MainMenuBackground image:Background"/>6 <Property Name="FrameEnabled" Value="set:true"/>7 <Property Name="BackgroundEnabled" Value="set:false"/>8 <Property Name="InheritsAlpha" Value="False" />4 <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/> 5 <Property Name="Image" Value="set:MainMenuBackground image:Background"/> 6 <Property Name="FrameEnabled" Value="set:true"/> 7 <Property Name="BackgroundEnabled" Value="set:false"/> 8 <Property Name="InheritsAlpha" Value="False" /> 9 9 </Window> 10 10 </GUILayout> -
code/branches/menu/data/gui/scripts/MainMenu.lua
r7163 r7588 3 3 local P = createMenuSheet("MainMenu") 4 4 P.loadAlong = { "SingleplayerMenu", "MultiplayerMenu", "SettingsMenu", "CreditsMenu" } 5 6 P.index = 0 5 7 6 8 -- events for MainMenu … … 30 32 end 31 33 34 function P.Key_clicked(e) 35 local we = tolua.cast(e, "CEGUI::KeyEventArgs") 36 cout(0, tostring(we.scancode)) 37 if tostring(we.scancode) == "15" then 38 P.index = P.index + 1 39 local window = winMgr:getWindow("orxonox/MainMenuBackground") 40 if P.index == window:getChildCount() then 41 P.index = 1 42 end 43 local child = window:getChildAtIdx(P.index-1) 44 elseif tostring(we.scancode) == "28" and P.index ~= 0 then 45 if P.index == 1 then 46 P.QuickGameTestButton_clicked() 47 elseif P.index == 2 then 48 P.SingleplayerButton_clicked() 49 elseif P.index == 3 then 50 P.MultiplayerButton_clicked() 51 elseif P.index == 4 then 52 P.SettingsButton_clicked() 53 elseif P.index == 5 then 54 P.CreditsButton_clicked() 55 elseif P.index == 6 then 56 P.ExitButton_clicked() 57 end 58 end 59 end 60 32 61 return P 33 62
Note: See TracChangeset
for help on using the changeset viewer.