Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2010, 3:00:19 PM (14 years ago)
Author:
dafrick
Message:

Merging menu branch to trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r7648 r7689  
    33local P = createMenuSheet("SingleplayerMenu")
    44
     5P.buttonList = {}
    56P.levelList = {}
    67P.itemList = {}
     
    1213    button:setSelected(false)
    1314    P.createLevelList()
     15
     16    --buttons are arranged in a 1x2 matrix
     17    local item = {
     18            ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"),
     19            ["function"]  = P.SingleplayerStartButton_clicked
     20    }
     21    P.buttonList[1] = item
     22
     23    local item = {
     24            ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"),
     25            ["function"]  = P.SingleplayerBackButton_clicked
     26    }
     27    P.buttonList[2] = item
    1428end
    1529
     
    4761end
    4862
     63function P.onShow()
     64    --indices to iterate through buttonlist
     65    P.oldindex = -2
     66    P.index = -1
     67end
     68
    4969function P.SingleplayerStartButton_clicked(e)
    5070    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
     
    7494end
    7595
     96function P.onKeyPressed()
     97    buttonIteratorHelper(P.buttonList, code, P, 1, 2)
     98end
     99
    76100return P
    77101
Note: See TracChangeset for help on using the changeset viewer.