Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestate/data/gui/scripts/MainMenu.lua @ 6459

Last change on this file since 6459 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: 660 bytes
Line 
1-- MainMenu.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new("MainMenu")
5if _REQUIREDNAME == nil then
6    MainMenu = P
7else
8    _G[_REQUIREDNAME] = P
9end
10
11-- events for MainMenu
12function P.QuickGameTestButton_clicked(e)
13    orxonox.execute("startGame")
14end
15
16function P.SingleplayerButton_clicked(e)
17    showGUI("SingleplayerMenu", true)
18end
19
20function P.MultiplayerButton_clicked(e)
21    showGUI("MultiplayerMenu", true)
22end
23
24function P.SettingsButton_clicked(e)
25    showGUI("SettingsMenu", true)
26end
27
28function P.CreditsButton_clicked(e)
29    showGUI("CreditsMenu", true)
30end
31
32function P.ExitButton_clicked(e)
33    orxonox.execute("exit")
34end
35
36return P
37
Note: See TracBrowser for help on using the repository browser.