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