Last change
on this file since 6519 was
6459,
checked in by rgrieder, 15 years ago
|
Simplified BasicGUI construction. Just give the name of the GUI as argument. The rest will be deduced.
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6363] | 1 | -- GameplayMenu.lua |
---|
| 2 | |
---|
| 3 | BasicGUI = require("BasicGUI") |
---|
[6459] | 4 | local P = BasicGUI:new("GameplayMenu") |
---|
[6363] | 5 | if _REQUIREDNAME == nil then |
---|
| 6 | GameplayMenu = P |
---|
| 7 | else |
---|
| 8 | _G[_REQUIREDNAME] = P |
---|
| 9 | end |
---|
| 10 | |
---|
| 11 | function P:init() |
---|
| 12 | dropdown = winMgr:getWindow("orxonox/ThemeCombobox") |
---|
| 13 | local themeList = {} |
---|
| 14 | table.insert(themeList, "Theme 1") |
---|
| 15 | table.insert(themeList, "Theme 2") |
---|
| 16 | table.insert(themeList, "Theme 3") |
---|
| 17 | for k,v in pairs(themeList) do |
---|
[6388] | 18 | item = CEGUI.createListboxTextItem(v) |
---|
[6363] | 19 | item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush") |
---|
| 20 | CEGUI.toCombobox(dropdown):addItem(item) |
---|
| 21 | end |
---|
| 22 | end |
---|
| 23 | |
---|
| 24 | function P.GameplayThemeCombobox_changed(e) |
---|
| 25 | -- theme |
---|
| 26 | debug("event: theme") |
---|
| 27 | end |
---|
| 28 | |
---|
| 29 | function P.GameplayDifficultyEasyButton_clicked(e) |
---|
| 30 | -- difficulty easy |
---|
| 31 | debug("event: easy") |
---|
| 32 | end |
---|
| 33 | |
---|
| 34 | function P.GameplayDifficultyNormalButton_clicked(e) |
---|
| 35 | -- difficulty normal |
---|
| 36 | debug("event: normal") |
---|
| 37 | end |
---|
| 38 | |
---|
| 39 | function P.GameplayDifficultyHardButton_clicked(e) |
---|
| 40 | -- difficulty hard |
---|
| 41 | debug("event: hard") |
---|
| 42 | end |
---|
| 43 | |
---|
| 44 | function P.GameplayBackButton_clicked(e) |
---|
| 45 | hideGUI(P.filename) |
---|
| 46 | end |
---|
| 47 | |
---|
| 48 | return P |
---|
| 49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.