Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 8, 2010, 1:27:51 PM (13 years ago)
Author:
konrad
Message:

decision popup in ingame menu has been changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/scripts/DecisionPopup.lua

    r6746 r7726  
    22
    33local P = createMenuSheet("DecisionPopup")
     4
     5P.buttonList = {}
     6
     7function P.onShow()
     8    --indices to iterate through buttonlist
     9    P.oldindex = -2
     10    P.index = -1
     11end
     12
     13function P.onLoad()
     14
     15    --button are arranged in a 1x2 matrix
     16    local item = {
     17            ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_yes"),
     18            ["function"]  = P.button_yes
     19    }
     20    P.buttonList[1] = item
     21
     22    local item = {
     23            ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_no"),
     24            ["function"]  = P.button_no
     25    }
     26    P.buttonList[2] = item
     27
     28end
    429
    530function P.setCallback(functionPtr)
     
    2651end
    2752
     53function P.onKeyPressed()
     54    buttonIteratorHelper(P.buttonList, code, P, 1, 2)
     55end
     56
    2857return P
    2958
Note: See TracChangeset for help on using the changeset viewer.