Last change
on this file since 6018 was
6018,
checked in by scheusso, 15 years ago
|
first version of the InGameMenu (return to main menu doesn't include level unloading yet)
|
File size:
622 bytes
|
Line | |
---|
1 | -- InGameMenu.lua |
---|
2 | |
---|
3 | BasicGUI = require("BasicGUI") |
---|
4 | local P = BasicGUI:new() --inherit everything from the gui package |
---|
5 | if _REQUIREDNAME == nil then |
---|
6 | InGameMenu = P |
---|
7 | else |
---|
8 | _G[_REQUIREDNAME] = P |
---|
9 | end |
---|
10 | |
---|
11 | P.filename = "InGameMenu" |
---|
12 | P.layoutString = "InGameMenu.layout" |
---|
13 | |
---|
14 | function P:init() |
---|
15 | end |
---|
16 | |
---|
17 | |
---|
18 | -- events for ingamemenu |
---|
19 | function P.button_quit_clicked(e) |
---|
20 | orxonox.CommandExecutor:execute("hideGUI InGameMenu") |
---|
21 | orxonox.CommandExecutor:execute("exit") |
---|
22 | end |
---|
23 | |
---|
24 | function P.button_mainmenu_clicked(e) |
---|
25 | orxonox.CommandExecutor:execute("showGUI MainMenu") |
---|
26 | orxonox.CommandExecutor:execute("hideGUI InGameMenu") |
---|
27 | end |
---|
28 | |
---|
29 | return P |
---|
30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.