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
|
Rev | Line | |
---|
[6266] | 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 | |
---|
[6311] | 17 | function P.execute(functionPtr, arguments) |
---|
[6283] | 18 | if functionPtr ~= nil then |
---|
[6311] | 19 | if arguments ~= nil then |
---|
| 20 | functionPtr(arguments) |
---|
| 21 | else |
---|
| 22 | functionPtr() |
---|
| 23 | end |
---|
[6266] | 24 | end |
---|
| 25 | end |
---|
| 26 | |
---|
| 27 | function P.setText( text ) |
---|
| 28 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
| 29 | end |
---|
| 30 | |
---|
[6283] | 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 | |
---|
[6266] | 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.