Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/InGameMenu.lua @ 6747

Last change on this file since 6747 was 6746, checked in by rgrieder, 15 years ago

Merged gamestates2 branch back to trunk.
This brings in some heavy changes in the GUI framework.
It should also fix problems with triggered asserts in the InputManager.

Note: PickupInventory does not seem to work —> Segfault when showing because before, the owner in GUIOverlay::setGUIName is already NULL.
I haven't tested it before, so I can't tell whether it's my changes.

  • Property svn:eol-style set to native
File size: 718 bytes
Line 
1-- InGameMenu.lua
2
3local P = createMenuSheet("InGameMenu")
4
5-- events for ingamemenu
6function P.button_quit_clicked(e)
7    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
8end
9
10function P.button_mainmenu_clicked(e)
11    orxonox.Game:getInstance():popState()
12    orxonox.Game:getInstance():popState()
13    orxonox.Game:getInstance():requestState("mainmenu")
14    hideMenuSheet("InGameMenu")
15end
16
17function P.button_settings_clicked(e)
18    showMenuSheet("SettingsMenu", true)
19end
20
21function P.button_return_clicked(e)
22    hideMenuSheet("InGameMenu")
23end
24
25function P.callback(doExit)
26    if doExit then
27        hideMenuSheet("InGameMenu")
28        orxonox.execute("exit")
29    end
30end
31
32return P
33
Note: See TracBrowser for help on using the repository browser.