Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/usability/data/gui/scripts/CreditsMenu.lua @ 10345

Last change on this file since 10345 was 7928, checked in by landauf, 14 years ago

more improvements for keyboard control of menus:

  • added setSelectionNear(r, c) function which tries to select the button closest to the given row/column
  • no initialization required anymore, the button-table grows dynamically if new buttons are inserted
  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1-- CreditsMenu.lua
2
3local P = createMenuSheet("CreditsMenu")
4
5P.scrollbarWidth = 13
6
7function P.onLoad()
8    P:setButton(1, 1, {
9            ["button"] = winMgr:getWindow("orxonox/CreditsBackButton"),
10            ["callback"]  = P.CreditsBackButton_clicked
11    })
12end
13
14function P.onShow()
15    local description = winMgr:getWindow("orxonox/CreditsText")
16    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
17    description:setProperty("VertFormatting", "TopAligned")
18    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:")
19
20    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
21    height = getStaticTextWindowHeight(description)
22    description:setHeight(CEGUI.UDim(0, height))
23end
24
25function P.CreditsBackButton_clicked(e)
26    hideMenuSheet(P.name)
27end
28
29return P
30
Note: See TracBrowser for help on using the repository browser.