| Last change
                  on this file since 6882 was
                  6266,
                  checked in by dafrick, 16 years ago | 
        
          | 
KeyBindMenu is working now. (Apart from some minor faults)Found some commandExecutor("show/hideGUI …") in DecisionPopup, and another possible bug.
 Added an InfoPopup
 
 | 
        | File size:
            763 bytes | 
      
      
        
  | Line |  | 
|---|
| 1 | -- DecisionPopup.lua | 
|---|
| 2 |  | 
|---|
| 3 | BasicGUI = require("BasicGUI") | 
|---|
| 4 | local P = BasicGUI:new() --inherit everything from the gui package | 
|---|
| 5 | if _REQUIREDNAME == nil then | 
|---|
| 6 | DecisionPopup = P | 
|---|
| 7 | else | 
|---|
| 8 | _G[_REQUIREDNAME] = P | 
|---|
| 9 | end | 
|---|
| 10 |  | 
|---|
| 11 | P.filename = "DecisionPopup" | 
|---|
| 12 | P.layoutString = "DecisionPopup.layout" | 
|---|
| 13 |  | 
|---|
| 14 | function P:init() | 
|---|
| 15 | end | 
|---|
| 16 |  | 
|---|
| 17 | function P.setCallback(functionPtr) | 
|---|
| 18 | P.functionPtr = functionPtr | 
|---|
| 19 | end | 
|---|
| 20 |  | 
|---|
| 21 | function P.setText( text ) | 
|---|
| 22 | winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text ) | 
|---|
| 23 | end | 
|---|
| 24 |  | 
|---|
| 25 | -- events for ingamemenu | 
|---|
| 26 | function P.button_yes(e) | 
|---|
| 27 | if P.functionPtr ~= nil then | 
|---|
| 28 | P.functionPtr(true) | 
|---|
| 29 | end | 
|---|
| 30 | hideGUI("DecisionPopup") | 
|---|
| 31 | end | 
|---|
| 32 |  | 
|---|
| 33 | function P.button_no(e) | 
|---|
| 34 | if P.functionPtr ~= nil then | 
|---|
| 35 | P.functionPtr(false) | 
|---|
| 36 | end | 
|---|
| 37 | hideGUI("DecisionPopup") | 
|---|
| 38 | end | 
|---|
| 39 |  | 
|---|
| 40 | return P | 
|---|
| 41 |  | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.