- Timestamp:
- Dec 13, 2009, 1:46:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/gui/scripts/InfoPopup.lua
r6334 r6335 1 1 -- InfoPopup.lua 2 3 4 2 5 3 BasicGUI = require("BasicGUI") 6 4 local P = BasicGUI:new() --inherit everything from the gui package 7 5 8 9 6 if _REQUIREDNAME == nil then 10 11 7 InfoPopup = P 12 13 8 else 14 15 9 _G[_REQUIREDNAME] = P 16 17 10 end 18 11 19 20 21 12 P.filename = "InfoPopup" 22 23 13 P.layoutString = "InfoPopup.layout" 24 14 25 26 27 15 function P:init() 28 29 16 end 30 17 31 32 33 18 function P.execute(functionPtr, arguments) 34 35 19 if functionPtr ~= nil then 36 37 20 if arguments ~= nil then 38 39 21 functionPtr(arguments) 40 41 22 else 42 43 23 functionPtr() 44 45 24 end 46 47 25 end 48 49 26 end 50 27 51 52 53 28 function P.setText( text ) 54 55 29 winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) 56 57 30 end 58 31 59 60 61 32 function P.setCloseButton(closeButton) 62 63 33 close = winMgr:getWindow("orxonox/InfoPopup_close") 64 65 34 close:setVisible(closeButton) 66 67 35 if(not closeButton) then 68 69 36 close:deactivate(); 70 71 37 else 72 73 38 close:activate(); 74 75 39 end 76 77 40 end 78 41 79 80 81 42 -- events for ingamemenu 82 83 84 43 function P.close(e) 85 86 44 hideGUI("InfoPopup") 87 88 45 end 89 46 90 91 92 47 return P 93
Note: See TracChangeset
for help on using the changeset viewer.