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