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.
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 | |
---|
5 | BasicGUI = require("BasicGUI") |
---|
6 | local P = BasicGUI:new() --inherit everything from the gui package |
---|
7 | |
---|
8 | |
---|
9 | if _REQUIREDNAME == nil then |
---|
10 | |
---|
11 | InfoPopup = P |
---|
12 | |
---|
13 | else |
---|
14 | |
---|
15 | _G[_REQUIREDNAME] = P |
---|
16 | |
---|
17 | end |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | P.filename = "InfoPopup" |
---|
22 | |
---|
23 | P.layoutString = "InfoPopup.layout" |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | function P:init() |
---|
28 | |
---|
29 | end |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | function 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 | |
---|
49 | end |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | function P.setText( text ) |
---|
54 | |
---|
55 | winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) |
---|
56 | |
---|
57 | end |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | function 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 | |
---|
77 | end |
---|
78 | |
---|
79 | |
---|
80 | |
---|
81 | -- events for ingamemenu |
---|
82 | |
---|
83 | |
---|
84 | function P.close(e) |
---|
85 | |
---|
86 | hideGUI("InfoPopup") |
---|
87 | |
---|
88 | end |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | return P |
---|
93 | |
---|
Note: See
TracBrowser
for help on using the repository browser.