Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/CreditsMenu.lua @ 8073

Last change on this file since 8073 was 7732, checked in by konrad, 14 years ago

Credits Menu is now scrollable

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1-- CreditsMenu.lua
2
3local P = createMenuSheet("CreditsMenu")
4
5P.buttonList = {}
6P.scrollbarWidth = 13
7
8function P.onLoad()
9    local item = {
10            ["button"] = winMgr:getWindow("orxonox/CreditsBackButton"),
11            ["function"]  = P.CreditsBackButton_clicked
12    }
13    P.buttonList[1] = item
14end
15
16function P.onShow()
17    --indices to iterate through buttonlist
18    P.oldindex = -2
19    P.index = -1
20
21    local description = winMgr:getWindow("orxonox/CreditsText")
22    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
23    description:setProperty("VertFormatting", "TopAligned")
24    description:setText("                                   Orxonox version 0.0.3 \n\n       Programming Language:  C++ - lua - tcl \n       Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE \n       Licence:  GNU General Public Licence - Creative Commons \n       http://www.orxonox.net \n \n       Credits:")
25
26    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
27    height = getStaticTextWindowHeight(description)
28    description:setHeight(CEGUI.UDim(0, height))
29end
30
31function P.CreditsBackButton_clicked(e)
32    hideMenuSheet(P.name)
33end
34
35function P.onKeyPressed() 
36    buttonIteratorHelper(P.buttonList, code, P, 1, 1)
37end
38
39return P
40
Note: See TracBrowser for help on using the repository browser.