Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2010, 2:04:54 PM (14 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/GraphicsMenu.lua

    r6746 r7687  
    22
    33local P = createMenuSheet("GraphicsMenu")
     4
     5P.buttonList = {}
     6
     7function P.onShow()
     8    --indices to iterate through buttonlist (trivial in this menu sheet)
     9    P.oldindex = -2
     10    P.index = -1
     11end
    412
    513function P.onLoad()
     
    8391    scrollbar_active = false
    8492    block = false
     93
     94    local item = {
     95            ["button"] = winMgr:getWindow("orxonox/GraphicsBackButton"),
     96            ["function"]  = P.GraphicsBackButton_clicked
     97    }
     98    P.buttonList[1] = item
    8599end
    86100
     
    195209end
    196210
     211function P.onKeyPressed()
     212    buttonIteratorHelper(P.buttonList, code, P, 1, 1)
     213end
     214
    197215return P
    198216
Note: See TracChangeset for help on using the changeset viewer.