Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/TestDialogButttons.lua @ 11484

Last change on this file since 11484 was 11451, checked in by patricwi, 7 years ago

Dialogue merged without core modifications

File size: 668 bytes
Line 
1local P = createMenuSheet("dialogue")
2
3function P.onLoad()
4    --buttons are arranged in a 2x1 Matrix (list)
5    P:setButton(1, 1, {
6            ["button"] = winMgr:getWindow("orxonox/QuickGameTestButton"),
7            ["callback"]  = P.QuickGameTestButton_clicked
8    })
9
10    P:setButton(2, 1, {
11            ["button"] = winMgr:getWindow("orxonox/SingleplayerButton"),
12            ["callback"]  = P.SingleplayerButton_clicked
13    })
14
15end
16
17-- events for options
18function P.QuickGameTestButton_clicked(e)
19    hideAllMenuSheets()
20    orxonox.execute("startGame")
21end
22
23function P.SingleplayerButton_clicked(e)
24    showMenuSheet("SingleplayerMenu", true)
25end
26
27
28
29return P
30
Note: See TracBrowser for help on using the repository browser.