Changeset 7588 for code/branches/menu/data/gui/scripts
- Timestamp:
- Oct 27, 2010, 1:15:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.