Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2010, 2:04:54 PM (13 years ago)
Author:
konrad
Message:

—function to iterate throgh a menusheet by using arrowkeys is added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu/data/gui/scripts/HostMenu.lua

    r7587 r7687  
    44
    55P.multiplayerMode = "startServer"
     6
     7P.buttonList = {}
     8
     9function P.onLoad()
     10    P.multiplayerMode = "startClient"
     11
     12    local item = {
     13            ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"),
     14            ["function"]  = P.HostMenuStartButton_clicked
     15    }
     16    P.buttonList[1] = item
     17
     18    local item = {
     19            ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"),
     20            ["function"]  = P.HostMenuBackButton_clicked
     21    }
     22    P.buttonList[2] = item
     23end
    624
    725function P.onShow()
     
    1937        P.showLevelList()
    2038    end
     39
     40    P.oldindex = -2
     41    P.index = -1
    2142
    2243end
     
    80101
    81102
     103function P.onKeyPressed()
     104    buttonIteratorHelper(P.buttonList, code, P, 1, 2)
     105end
     106
     107
    82108
    83109return P
Note: See TracChangeset for help on using the changeset viewer.