Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua @ 6720

Last change on this file since 6720 was 6718, checked in by rgrieder, 15 years ago

Moved BasicGUI.lua to GUISheet.lua and derived MenuSheet.lua as well as HUDSheet.lua from it.
Also, to make a new GUI sheet, use either createHUDSheet or createMenuSheet.
Also removed bShowCursor from the showGUI function. This is now always a value directed by the GUI sheet.

  • Property svn:eol-style set to native
File size: 529 bytes
Line 
1-- DecisionPopup.lua
2
3local P = createMenuSheet("DecisionPopup")
4
5function P.setCallback(functionPtr)
6    P.functionPtr = functionPtr
7end
8
9function P.setText( text )
10    winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text )
11end
12
13-- events for ingamemenu
14function P.button_yes(e)
15    if P.functionPtr ~= nil then
16        P.functionPtr(true)
17    end
18    hideGUI("DecisionPopup")
19end
20
21function P.button_no(e)
22    if P.functionPtr ~= nil then
23        P.functionPtr(false)
24    end
25    hideGUI("DecisionPopup")
26end
27
28return P
29
Note: See TracBrowser for help on using the repository browser.