Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestate/data/gui/scripts/InfoPopup.lua @ 6519

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

Simplified BasicGUI construction. Just give the name of the GUI as argument. The rest will be deduced.

  • Property svn:eol-style set to native
File size: 811 bytes
Line 
1-- InfoPopup.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new("InfoPopup")
5
6if _REQUIREDNAME == nil then
7    InfoPopup = P
8else
9    _G[_REQUIREDNAME] = P
10end
11
12function P:init()
13end
14
15function P.execute(functionPtr, arguments)
16    if functionPtr ~= nil then
17        if arguments ~= nil then
18            functionPtr(arguments)
19        else
20            functionPtr()
21        end
22    end
23end
24
25function P.setText( text )
26    winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
27end
28
29function P.setCloseButton(closeButton)
30    close = winMgr:getWindow("orxonox/InfoPopup_close")
31    close:setVisible(closeButton)
32    if(not closeButton) then
33        close:deactivate();
34    else
35        close:activate();
36    end
37end
38
39-- events for ingamemenu
40function P.close(e)
41    hideGUI("InfoPopup")
42end
43
44return P
Note: See TracBrowser for help on using the repository browser.