Last change
on this file since 7827 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
|
Rev | Line | |
---|
[6363] | 1 | -- CreditsMenu.lua |
---|
| 2 | |
---|
[6746] | 3 | local P = createMenuSheet("CreditsMenu") |
---|
[6363] | 4 | |
---|
[7689] | 5 | P.buttonList = {} |
---|
[7732] | 6 | P.scrollbarWidth = 13 |
---|
[7689] | 7 | |
---|
| 8 | function P.onLoad() |
---|
| 9 | local item = { |
---|
| 10 | ["button"] = winMgr:getWindow("orxonox/CreditsBackButton"), |
---|
| 11 | ["function"] = P.CreditsBackButton_clicked |
---|
| 12 | } |
---|
| 13 | P.buttonList[1] = item |
---|
| 14 | end |
---|
| 15 | |
---|
| 16 | function 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] | 29 | end |
---|
| 30 | |
---|
[6363] | 31 | function P.CreditsBackButton_clicked(e) |
---|
[6746] | 32 | hideMenuSheet(P.name) |
---|
[6363] | 33 | end |
---|
| 34 | |
---|
[7689] | 35 | function P.onKeyPressed() |
---|
| 36 | buttonIteratorHelper(P.buttonList, code, P, 1, 1) |
---|
| 37 | end |
---|
| 38 | |
---|
[6363] | 39 | return P |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.