Last change
on this file since 6292 was
6283,
checked in by dafrick, 15 years ago
|
Some enhancements in KeyBindMenu.lua and InfoPopup, clear doesn't work, yet.
|
File size:
796 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) |
---|
18 | if functionPtr ~= nil then |
---|
19 | functionPtr() |
---|
20 | end |
---|
21 | end |
---|
22 | |
---|
23 | function P.setText( text ) |
---|
24 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
25 | end |
---|
26 | |
---|
27 | function P.setCloseButton(closeButton) |
---|
28 | close = winMgr:getWindow("orxonox/InfoPopup_close") |
---|
29 | close:setVisible(closeButton) |
---|
30 | if(not closeButton) then |
---|
31 | close:deactivate(); |
---|
32 | else |
---|
33 | close:activate(); |
---|
34 | end |
---|
35 | end |
---|
36 | |
---|
37 | -- events for ingamemenu |
---|
38 | function P.close(e) |
---|
39 | hideGUI("InfoPopup") |
---|
40 | end |
---|
41 | |
---|
42 | return P |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.