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/AudioMenu.lua

    r6746 r7687  
    22
    33local P = createMenuSheet("AudioMenu")
     4
     5P.buttonList = {}
     6
     7function P.onShow()
     8    P.oldindex = -2
     9    P.index = -1
     10end
    411
    512function P.onLoad()
     
    4249        listboxwindow:setItemSelectState(0,true)
    4350    end
     51
     52    local item = {
     53            ["button"] = winMgr:getWindow("orxonox/AudioBackButton"),
     54            ["function"]  = P.AudioBackButton_clicked
     55    }
     56    P.buttonList[1] = item
    4457end
    4558
     
    172185end
    173186
     187function P.onKeyPressed()
     188    buttonIteratorHelper(P.buttonList, code, P, 1, 1)
     189end
     190
    174191return P
    175192
Note: See TracChangeset for help on using the changeset viewer.