Last change
on this file since 6569 was
6537,
checked in by rgrieder, 15 years ago
|
Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.
|
-
Property svn:eol-style set to
native
|
File size:
785 bytes
|
Rev | Line | |
---|
[6363] | 1 | -- InfoPopup.lua |
---|
| 2 | |
---|
| 3 | BasicGUI = require("BasicGUI") |
---|
[6459] | 4 | local P = BasicGUI:new("InfoPopup") |
---|
[6363] | 5 | |
---|
| 6 | if _REQUIREDNAME == nil then |
---|
| 7 | InfoPopup = P |
---|
| 8 | else |
---|
| 9 | _G[_REQUIREDNAME] = P |
---|
| 10 | end |
---|
| 11 | |
---|
| 12 | function P.execute(functionPtr, arguments) |
---|
| 13 | if functionPtr ~= nil then |
---|
| 14 | if arguments ~= nil then |
---|
| 15 | functionPtr(arguments) |
---|
| 16 | else |
---|
| 17 | functionPtr() |
---|
| 18 | end |
---|
| 19 | end |
---|
| 20 | end |
---|
| 21 | |
---|
[6537] | 22 | function P.setText(text) |
---|
[6363] | 23 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
| 24 | end |
---|
| 25 | |
---|
| 26 | function P.setCloseButton(closeButton) |
---|
| 27 | close = winMgr:getWindow("orxonox/InfoPopup_close") |
---|
| 28 | close:setVisible(closeButton) |
---|
| 29 | if(not closeButton) then |
---|
| 30 | close:deactivate(); |
---|
| 31 | else |
---|
| 32 | close:activate(); |
---|
| 33 | end |
---|
| 34 | end |
---|
| 35 | |
---|
| 36 | -- events for ingamemenu |
---|
| 37 | function P.close(e) |
---|
[6537] | 38 | hideGUI(P.filename) |
---|
[6363] | 39 | end |
---|
| 40 | |
---|
| 41 | return P |
---|
Note: See
TracBrowser
for help on using the repository browser.