local schemeMgr = CEGUI.SchemeManager:getSingleton() local winMgr = CEGUI.WindowManager:getSingleton() local logger = CEGUI.Logger:getSingleton() local system = CEGUI.System:getSingleton() schemeMgr:loadScheme("TaharezLookSkin.scheme") system:setDefaultMouseCursor("TaharezLook", "MouseArrow") system:setDefaultFont("BlueHighway-12") local mainmenu = winMgr:loadWindowLayout("MainMenu.layout") local backgroundImage = CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile("GUI/Background", "main_menu_1.jpg") local background = winMgr:createWindow("TaharezLook/StaticImage", "orxonox/Background") background:setProperty("FrameEnabled", "set: true") background:setProperty("BackgroundEnabled", "set: false") background:setProperty("Image", "set: GUI/Background image:full_image") background:addChildWindow(mainmenu) function button_quit_clicked(e) hideGUI() orxonox.CommandExecutor:execute("exit") end function button_standalone_clicked(e) orxonox.CommandExecutor:execute("selectGameState standalone") hideGUI() end function button_server_clicked(e) orxonox.CommandExecutor:execute("selectGameState server") hideGUI() end function button_dedicated_clicked(e) orxonox.CommandExecutor:execute("selectGameState dedicated") hideGUI() end function button_client_clicked(e) orxonox.CommandExecutor:execute("selectGameState client") hideGUI() end showBackground = true function showMainMenu() if showBackground == true then system:setGUISheet(background) else orxonox.GUIManager:getInstance():testOutput("set new Menu") system:setGUISheet(mainmenu) end return 0; end showing = true function toggleGUI() if showing == true then mainmenu:hide() showing = false orxonox.GUIManager:getInstance():testOutput("hiding Menu") else mainmenu:show() showing = true orxonox.GUIManager:getInstance():testOutput("showing Menu") end end function hideGUI() --system:setGUISheet(nil) --orxonox.GUIManager:getInstance():hideGUI() end