Last change
on this file since 6571 was
6537,
checked in by rgrieder, 15 years ago
|
Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.
|
-
Property svn:eol-style set to
native
|
File size:
643 bytes
|
Line | |
---|
1 | -- DecisionPopup.lua |
---|
2 | |
---|
3 | BasicGUI = require("BasicGUI") |
---|
4 | local P = BasicGUI:new("DecisionPopup") |
---|
5 | if _REQUIREDNAME == nil then |
---|
6 | DecisionPopup = P |
---|
7 | else |
---|
8 | _G[_REQUIREDNAME] = P |
---|
9 | end |
---|
10 | |
---|
11 | function P.setCallback(functionPtr) |
---|
12 | P.functionPtr = functionPtr |
---|
13 | end |
---|
14 | |
---|
15 | function P.setText( text ) |
---|
16 | winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text ) |
---|
17 | end |
---|
18 | |
---|
19 | -- events for ingamemenu |
---|
20 | function P.button_yes(e) |
---|
21 | if P.functionPtr ~= nil then |
---|
22 | P.functionPtr(true) |
---|
23 | end |
---|
24 | hideGUI("DecisionPopup") |
---|
25 | end |
---|
26 | |
---|
27 | function P.button_no(e) |
---|
28 | if P.functionPtr ~= nil then |
---|
29 | P.functionPtr(false) |
---|
30 | end |
---|
31 | hideGUI("DecisionPopup") |
---|
32 | end |
---|
33 | |
---|
34 | return P |
---|
35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.