Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/media/gui/scripts/mainmenu_2.lua @ 5491

Last change on this file since 5491 was 5491, checked in by bknecht, 15 years ago

new version of the GUI

File size: 1.2 KB
Line 
1-- mainmenu_2.lua
2gui = require("gui")
3local P = gui:new() --inherit everything from the gui package
4
5mainmenu_2 = P
6
7P.filename = "mainmenu_2"
8P.layoutString = "MainMenu_2.layout"
9
10-- overwrites load function of previous load function
11function P:load()
12    element = P.__index.load(P) -- calling load function of parent class with ourselves and do other stuff now
13    --win = winMgr:getWindow("orxonox/LevelListBox")
14    --print(win.getItemCount())
15    --item = winMgr:createWindow("TaharezLook/ListboxItem", "orxonox/LevelListBoxItem1")
16    --item:setText("HiHo")
17    --win:addItem(item)
18    --print(win:getItemCount())
19    return element
20end
21
22
23-- events for mainmenu
24function P.button_quit_clicked(e)
25  hideGUI()
26  orxonox.CommandExecutor:execute("exit")
27end
28
29function P.button_standalone_clicked(e)
30  orxonox.CommandExecutor:execute("startGame")
31  toggleGUI()
32end
33
34function P.button_server_clicked(e)
35  orxonox.CommandExecutor:execute("echo Not yet supported!")
36  hideGUI()
37end
38
39function P.button_dedicated_clicked(e)
40  orxonox.CommandExecutor:execute("echo Not yet supported!")
41  hideGUI()
42end
43
44function P.button_client_clicked(e)
45  orxonox.CommandExecutor:execute("echo Not yet supported!")
46  hideGUI()
47end
48
49return mainmenu_2
50
Note: See TracBrowser for help on using the repository browser.