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

    r7163 r7663  
    33local P = createMenuSheet("SettingsMenu")
    44P.loadAlong = { "ControlsMenu", "AudioMenu", "GraphicsMenu" }
     5
     6P.buttonList = {}
     7
     8function P.onLoad()
     9    --"Gameplay" and "Multiplayer Options" are not integrated in the list
     10   
     11    local item = {
     12            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/GraphicsButton"),
     13            ["function"]  = P.SettingsGraphicsButton_clicked
     14    }
     15    P.buttonList[2] = item
     16
     17    local item = {
     18            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/AudioButton"),
     19            ["function"]  = P.SettingsAudioButton_clicked
     20    }
     21    P.buttonList[4] = item
     22
     23
     24    local item = {
     25            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),
     26            ["function"]  = P.SettingsControlsButton_clicked
     27    }
     28    P.buttonList[5] = item
     29
     30    local item = {
     31            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),
     32            ["function"]  = P.SettingsMiscellaneousButton_clicked
     33    }
     34    P.buttonList[6] = item
     35
     36    local item = {
     37            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),
     38            ["function"]  = P.SettingsBackButton_clicked
     39    }
     40    P.buttonList[7] = item
     41
     42end
     43
     44function P.onShow()
     45    P.oldindex = 3
     46    P.index = 2
     47end
    548
    649function P.SettingsGameplayButton_clicked(e)
     
    3275end
    3376
     77function P.onKeyPressed()
     78    cout(0,code)
     79    buttonIteratorHelper(P.buttonList, code, P, 4, 2)
     80    --indexTester(P.buttonList,code,P,4,2)
     81end
     82
    3483return P
    3584
Note: See TracChangeset for help on using the changeset viewer.