Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/gui/scripts/MainMenu.lua @ 6616

Last change on this file since 6616 was 6403, checked in by rgrieder, 15 years ago

Added lua convenience function for console commmands: orxonox.execute(cmd)
Also replaced the config commands with the actual orxonox.config function.

  • Property svn:eol-style set to native
File size: 752 bytes
RevLine 
[5661]1-- MainMenu.lua
[5491]2
[5661]3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new() --inherit everything from the gui package
5if _REQUIREDNAME == nil then
6    MainMenu = P
7else
8    _G[_REQUIREDNAME] = P
9end
[5491]10
[5661]11P.filename = "MainMenu"
12P.layoutString = "MainMenu.layout"
[5491]13
[6206]14-- events for MainMenu
15function P.QuickGameTestButton_clicked(e)
[6403]16    orxonox.execute("startGame")
[5491]17end
18
[6206]19function P.SingleplayerButton_clicked(e)
20    showGUI("SingleplayerMenu", true)
[5491]21end
22
[6206]23function P.MultiplayerButton_clicked(e)
24    showGUI("MultiplayerMenu", true)
[5491]25end
26
[6206]27function P.SettingsButton_clicked(e)
28    showGUI("SettingsMenu", true)
[5491]29end
30
[6206]31function P.CreditsButton_clicked(e)
32    showGUI("CreditsMenu", true)
[5491]33end
34
[6206]35function P.ExitButton_clicked(e)
[6403]36    orxonox.execute("exit")
[5491]37end
38
[5661]39return P
[5491]40
Note: See TracBrowser for help on using the repository browser.