Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/map/data/gui/scripts/DecisionPopup.lua @ 9581

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

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
  • Property svn:eol-style set to native
File size: 763 bytes
Line 
1-- DecisionPopup.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new() --inherit everything from the gui package
5if _REQUIREDNAME == nil then
6    DecisionPopup = P
7else
8    _G[_REQUIREDNAME] = P
9end
10
11P.filename = "DecisionPopup"
12P.layoutString = "DecisionPopup.layout"
13
14function P:init()
15end
16
17function P.setCallback(functionPtr)
18    P.functionPtr = functionPtr
19end
20
21function P.setText( text )
22    winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text )
23end
24
25-- events for ingamemenu
26function P.button_yes(e)
27    if P.functionPtr ~= nil then
28        P.functionPtr(true)
29    end
30    hideGUI("DecisionPopup")
31end
32
33function P.button_no(e)
34    if P.functionPtr ~= nil then
35        P.functionPtr(false)
36    end
37    hideGUI("DecisionPopup")
38end
39
40return P
41
Note: See TracBrowser for help on using the repository browser.