Last change
on this file since 7216 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 | |
---|
3 | BasicGUI = require("BasicGUI") |
---|
4 | local P = BasicGUI:new() --inherit everything from the gui package |
---|
5 | if _REQUIREDNAME == nil then |
---|
6 | InfoPopup = P |
---|
7 | else |
---|
8 | _G[_REQUIREDNAME] = P |
---|
9 | end |
---|
10 | |
---|
11 | P.filename = "InfoPopup" |
---|
12 | P.layoutString = "InfoPopup.layout" |
---|
13 | |
---|
14 | function P:init() |
---|
15 | end |
---|
16 | |
---|
17 | function 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 |
---|
25 | end |
---|
26 | |
---|
27 | function P.setText( text ) |
---|
28 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
29 | end |
---|
30 | |
---|
31 | function 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 |
---|
39 | end |
---|
40 | |
---|
41 | -- events for ingamemenu |
---|
42 | function P.close(e) |
---|
43 | hideGUI("InfoPopup") |
---|
44 | end |
---|
45 | |
---|
46 | return P |
---|
47 | |
---|
Note: See
TracBrowser
for help on using the repository browser.