Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6659


Ignore:
Timestamp:
Mar 30, 2010, 4:34:01 PM (14 years ago)
Author:
rgrieder
Message:

Use "P." instead of "P:" when using our sheets as objects, not classes.
And use "P." instead of "self.".
This does not count for BasicGUI.lua because this is in fact seen as a class!!!

Location:
code/branches/gamestate/data/gui/scripts
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/data/gui/scripts/AudioMenu.lua

    r6621 r6659  
    33local P = createSheet("AudioMenu")
    44
    5 function P:init()
     5function P.init()
    66    soundMgr = orxonox.SoundManager:getInstance()
    77    block = false
  • code/branches/gamestate/data/gui/scripts/GameplayMenu.lua

    r6623 r6659  
    33local P = createSheet("GameplayMenu")
    44
    5 function P:init()
     5function P.init()
    66    dropdown = winMgr:getWindow("orxonox/ThemeCombobox")
    77    local themeList = {}
  • code/branches/gamestate/data/gui/scripts/GraphicsMenu.lua

    r6623 r6659  
    33local P = createSheet("GraphicsMenu")
    44
    5 function P:init()
     5function P.init()
    66    block = true
    77    file = orxonox.PathConfig:getConfigPathString() .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
  • code/branches/gamestate/data/gui/scripts/KeyBindMenu.lua

    r6621 r6659  
    33local P = createSheet("KeyBindMenu")
    44
    5 function P:init()
     5function P.init()
    66
    77    commandList = {}
  • code/branches/gamestate/data/gui/scripts/MouseControlsMenu.lua

    r6621 r6659  
    33local P = createSheet("MouseControlsMenu")
    44
    5 function P:init()
     5function P.init()
    66    block = false
    77    mousenormalscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalScrollbar"),"CEGUI::Scrollbar")
  • code/branches/gamestate/data/gui/scripts/MultiplayerMenu.lua

    r6621 r6659  
    33local P = createSheet("MultiplayerMenu")
    44
    5 function P:init()
     5function P.init()
    66    listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
    77    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
  • code/branches/gamestate/data/gui/scripts/PickupInventory.lua

    r6621 r6659  
    88
    99-- events
    10 function P:frmUpdate(e)
     10function P.frmUpdate(e)
    1111    local equipCount = orxonox.PickupInventory:getEquipmentCount()
    1212    local usableCount = orxonox.PickupInventory:getUsableCount()
    1313
    14     if equipCount ~= self.lastEquipmentCount_ or usableCount ~= self.lastUsableCount_ then
    15         self:updateTabs()
     14    if equipCount ~= P.lastEquipmentCount_ or usableCount ~= P.lastUsableCount_ then
     15        P.updateTabs()
    1616    end
    1717end
     
    2525end
    2626
    27 function P:mItemClicked(e)
     27function P.mItemClicked(e)
    2828    local w = CEGUI.toWindowEventArgs(e).window
    2929    local name = w:getName()
     
    3636
    3737    if t == "use" then
    38         if self.currentUsableID_ >= 0 then
    39             winMgr:getWindow("orxonox/Inventory/Title/use/" .. self.currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF")
     38        if P.currentUsableID_ >= 0 then
     39            winMgr:getWindow("orxonox/Inventory/Title/use/" .. P.currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF")
    4040        end
    4141        orxonox.PickupInventory:selectUsable(tonumber(i))
    42         self.currentUsableID_ = tonumber(i)
     42        P.currentUsableID_ = tonumber(i)
    4343        winMgr:getWindow("orxonox/Inventory/Title/use/" .. i):setProperty("TextColours", "tl:FFFF4444 tr:FFFF4444 bl:FFFF4444 br:FFFF4444")
    4444    end
     
    4646
    4747-- methods
    48 function P:updateTabs()
     48function P.updateTabs()
    4949    local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment")
    5050    local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable")
     
    5252    orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin)
    5353
    54     self.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
    55     self.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
    56     self.lastUsableCount_ = orxonox.PickupInventory:getUsableCount()
     54    P.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
     55    P.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
     56    P.lastUsableCount_ = orxonox.PickupInventory:getUsableCount()
    5757end
    5858
  • code/branches/gamestate/data/gui/scripts/QuestGUI.lua

    r6621 r6659  
    33local P = createSheet("QuestGUI")
    44
    5 function P:show()
    6     self.window:show() -- TDO: Do this through parent...
    7     self.visible = true
     5function P.show()
     6    P.window:show() -- TDO: Do this through parent...
     7    P.visible = true
    88
    99    local questManager = orxonox.QuestManager:getInstance()
  • code/branches/gamestate/data/gui/scripts/SingleplayerMenu.lua

    r6621 r6659  
    33local P = createSheet("SingleplayerMenu")
    44
    5 function P:init()
     5function P.init()
    66    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
    77    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
Note: See TracChangeset for help on using the changeset viewer.