Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7915 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
RevLine 
[6363]1-- CreditsMenu.lua
2
[6746]3local P = createMenuSheet("CreditsMenu")
[6363]4
[7689]5P.buttonList = {}
[7732]6P.scrollbarWidth = 13
[7689]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
[7732]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))
[7689]29end
30
[6363]31function P.CreditsBackButton_clicked(e)
[6746]32    hideMenuSheet(P.name)
[6363]33end
34
[7689]35function P.onKeyPressed() 
36    buttonIteratorHelper(P.buttonList, code, P, 1, 1)
37end
38
[6363]39return P
40
Note: See TracBrowser for help on using the repository browser.