Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Merged remaining revisions from gamestate to gamestates2.

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