Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/consolecommands/data/gui/scripts/InfoPopup.lua @ 6333

Last change on this file since 6333 was 6311, checked in by dafrick, 15 years ago

The KeyBindMenu now shows all Keybindings and allows for various manipulations.
For this the bookkeeping in KeyBinder has ben improved.
Also KeyEscape now can't be bound to other commands.

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