-- mainmenu_2.lua gui = require("gui") local P = gui:new() --inherit everything from the gui package mainmenu_2 = P P.filename = "mainmenu_2" P.layoutString = "MainMenu_2.layout" -- overwrites load function of previous load function function P:load() element = P.__index.load(P) -- calling load function of parent class with ourselves and do other stuff now --win = winMgr:getWindow("orxonox/LevelListBox") --print(win.getItemCount()) --item = winMgr:createWindow("TaharezLook/ListboxItem", "orxonox/LevelListBoxItem1") --item:setText("HiHo") --win:addItem(item) --print(win:getItemCount()) return element end -- events for mainmenu function P.button_quit_clicked(e) hideGUI() orxonox.CommandExecutor:execute("exit") end function P.button_standalone_clicked(e) orxonox.CommandExecutor:execute("startGame") toggleGUI() end function P.button_server_clicked(e) orxonox.CommandExecutor:execute("echo Not yet supported!") hideGUI() end function P.button_dedicated_clicked(e) orxonox.CommandExecutor:execute("echo Not yet supported!") hideGUI() end function P.button_client_clicked(e) orxonox.CommandExecutor:execute("echo Not yet supported!") hideGUI() end return mainmenu_2