Last change
on this file since 6778 was
6621,
checked in by rgrieder, 15 years ago
|
Simplified GUI sheet creation (first lines in the lua file) a lot by exporting it to GUITools.lua
|
-
Property svn:eol-style set to
native
|
File size:
670 bytes
|
Rev | Line | |
---|
[6363] | 1 | -- InfoPopup.lua |
---|
| 2 | |
---|
[6621] | 3 | local P = createSheet("InfoPopup") |
---|
[6363] | 4 | |
---|
| 5 | function P.execute(functionPtr, arguments) |
---|
| 6 | if functionPtr ~= nil then |
---|
| 7 | if arguments ~= nil then |
---|
| 8 | functionPtr(arguments) |
---|
| 9 | else |
---|
| 10 | functionPtr() |
---|
| 11 | end |
---|
| 12 | end |
---|
| 13 | end |
---|
| 14 | |
---|
[6537] | 15 | function P.setText(text) |
---|
[6363] | 16 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
| 17 | end |
---|
| 18 | |
---|
| 19 | function P.setCloseButton(closeButton) |
---|
| 20 | close = winMgr:getWindow("orxonox/InfoPopup_close") |
---|
| 21 | close:setVisible(closeButton) |
---|
| 22 | if(not closeButton) then |
---|
| 23 | close:deactivate(); |
---|
| 24 | else |
---|
| 25 | close:activate(); |
---|
| 26 | end |
---|
| 27 | end |
---|
| 28 | |
---|
| 29 | -- events for ingamemenu |
---|
| 30 | function P.close(e) |
---|
[6537] | 31 | hideGUI(P.filename) |
---|
[6363] | 32 | end |
---|
| 33 | |
---|
| 34 | return P |
---|
Note: See
TracBrowser
for help on using the repository browser.