Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 23, 2010, 11:41:30 AM (14 years ago)
Author:
rgrieder
Message:

Eliminated all unnecessary global Lua variables and replaced them either with a local or a instance variable (P.myVar).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates3/data/gui/scripts/SingleplayerMenu.lua

    r6754 r6773  
    44
    55function P.onLoad()
    6     listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
    7     preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     6    local listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
     7    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
    88    orxonox.LevelManager:getInstance():compileAvailableLevelList()
    99    local levelList = {}
     
    2020    table.sort(levelList)
    2121    for k,v in pairs(levelList) do
    22         item = CEGUI.createListboxTextItem(v)
     22        local item = CEGUI.createListboxTextItem(v)
    2323        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    2424        CEGUI.toListbox(listbox):addItem(item)
Note: See TracChangeset for help on using the changeset viewer.