Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestate/data/gui/scripts/DecisionPopup.lua @ 6537

Last change on this file since 6537 was 6537, checked in by rgrieder, 14 years ago

Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.

  • 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.