Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6571 was 6537, checked in by rgrieder, 15 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
RevLine 
[6145]1-- DecisionPopup.lua
2
3BasicGUI = require("BasicGUI")
[6459]4local P = BasicGUI:new("DecisionPopup")
[6145]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
[6266]24    hideGUI("DecisionPopup")
[6145]25end
26
27function P.button_no(e)
28    if P.functionPtr ~= nil then
29        P.functionPtr(false)
30    end
[6266]31    hideGUI("DecisionPopup")
[6145]32end
33
34return P
35
Note: See TracBrowser for help on using the repository browser.