Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/gui/scripts/InfoPopup.lua @ 6334

Last change on this file since 6334 was 6334, checked in by cmueri, 15 years ago

All the menus (inclusive InGameMenus) have an equal design, some menus have a larger window. They should be ready to presentate now.
BUG REPORT in KeyBindMenu: If there are >4 buttons in a row, the GUI doesn't show those correctly.

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