Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 24, 2010, 3:33:26 PM (14 years ago)
Author:
konrad
Message:

key handling in some menu sheets has been added.

File:
1 edited

Legend:

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

    r7587 r7663  
    33local P = createMenuSheet("MultiplayerMenu")
    44
     5P.buttonList = {}
     6
    57function P.onLoad()
    6     P.multiplayerMode = "startClient"
     8    P.multiplayerMode = "startClient"
     9
     10    local item = {
     11            ["button"] = winMgr:getWindow("orxonox/MultiplayerJoinButton2"),
     12            ["function"]  = P.MultiplayerJoinButton_clicked
     13    }
     14    P.buttonList[1] = item
     15
     16    local item = {
     17            ["button"] = winMgr:getWindow("orxonox/MultiplayerHostButton2"),
     18            ["function"]  = P.MultiplayerHostButton_clicked
     19    }
     20    P.buttonList[2] = item
     21
     22    local item = {
     23            ["button"] = winMgr:getWindow("orxonox/MultiplayerBackButton"),
     24            ["function"]  = P.MultiplayerBackButton_clicked
     25    }
     26    P.buttonList[4] = item
     27
    728end
    829
    930function P.onShow()
    1031    P.showServerList()
     32    P.oldindex = -2
     33    P.index = -1
    1134end
    1235
     
    109132end
    110133
     134function P.onKeyPressed()
     135    cout(0,code)
     136    buttonIteratorHelper(P.buttonList, code, P, 2, 2)
     137    --indexTester(P.buttonList,code,P,2,3)
     138end
     139
    111140return P
    112141
Note: See TracChangeset for help on using the changeset viewer.