Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/menu/data/gui/scripts/CreditsMenu.lua @ 7687

Last change on this file since 7687 was 7687, checked in by konrad, 13 years ago

—function to iterate throgh a menusheet by using arrowkeys is added

  • Property svn:eol-style set to native
File size: 559 bytes
Line 
1-- CreditsMenu.lua
2
3local P = createMenuSheet("CreditsMenu")
4
5P.buttonList = {}
6
7function P.onLoad()
8    local item = {
9            ["button"] = winMgr:getWindow("orxonox/CreditsBackButton"),
10            ["function"]  = P.CreditsBackButton_clicked
11    }
12    P.buttonList[1] = item
13end
14
15function P.onShow()
16    --indices to iterate through buttonlist
17    P.oldindex = -2
18    P.index = -1
19end
20
21function P.CreditsBackButton_clicked(e)
22    hideMenuSheet(P.name)
23end
24
25function P.onKeyPressed() 
26    buttonIteratorHelper(P.buttonList, code, P, 1, 1)
27end
28
29return P
30
Note: See TracBrowser for help on using the repository browser.