Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6704 for code/branches


Ignore:
Timestamp:
Apr 12, 2010, 11:23:45 PM (15 years ago)
Author:
rgrieder
Message:

"filename" —> "name" table entry for GUI sheets.

Location:
code/branches/gamestates2/data/gui/scripts
Files:
14 edited

Legend:

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

    r6662 r6704  
    169169
    170170function P.AudioBackButton_clicked(e)
    171     hideGUI(P.filename)
     171    hideGUI(P.name)
    172172end
    173173
  • code/branches/gamestates2/data/gui/scripts/BasicGUI.lua

    r6662 r6704  
    88
    99-- constructor of the GUI
    10 function P:new(_filename, _gui, _visible)
     10function P:new(_name, _gui, _visible)
    1111    local newElement = {
    12         filename = _filename,
     12        name = _name,
    1313        gui = _gui,
    1414        visible = _visible or false
     
    2525-- Override this function if you want to change one of the three input parameters:
    2626-- showCursor = true, useKeyboard = true and blockJoyStick = false
    27 -- But don't forget to stick to the naming convention ("GUI_" .. self.filename)
     27-- But don't forget to stick to the naming convention ("GUI_" .. self.name)
    2828function P:createInputState()
    29     self.inputState = guiMgr:createInputState("GUI_" .. self.filename)
     29    self.inputState = guiMgr:createInputState("GUI_" .. self.name)
    3030end
    3131
     
    4343
    4444function P:load()
    45     self.window = winMgr:loadWindowLayout(self.filename .. ".layout")
     45    self.window = winMgr:loadWindowLayout(self.name .. ".layout")
    4646    self:createInputState()
    4747    self:init()
  • code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua

    r6662 r6704  
    1212
    1313function P.ControlsBackButton_clicked(e)
    14     hideGUI(P.filename)
     14    hideGUI(P.name)
    1515end
    1616
  • code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua

    r6666 r6704  
    44
    55function P.CreditsBackButton_clicked(e)
    6     hideGUI(P.filename)
     6    hideGUI(P.name)
    77end
    88
  • code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua

    r6662 r6704  
    3737
    3838function P.GameplayBackButton_clicked(e)
    39     hideGUI(P.filename)
     39    hideGUI(P.name)
    4040end
    4141
  • code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua

    r6662 r6704  
    192192
    193193function P.GraphicsBackButton_clicked(e)
    194     hideGUI(P.filename)
     194    hideGUI(P.name)
    195195end
    196196
  • code/branches/gamestates2/data/gui/scripts/InfoPopup.lua

    r6662 r6704  
    2929-- events for ingamemenu
    3030function P.close(e)
    31     hideGUI(P.filename)
     31    hideGUI(P.name)
    3232end
    3333
  • code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua

    r6662 r6704  
    126126    plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    127127    plus:setText("add")
    128     orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.filename .. ".KeyBindPlus_clicked")
     128    orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.name .. ".KeyBindPlus_clicked")
    129129    line:addChildWindow(plus)
    130130    offset = offset + addWidth + spaceWidth
     
    141141        button:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))
    142142        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    143         orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked")
    144         --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked")
     143        orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.name .. ".KeyBindButton_clicked")
     144        --button:subscribeScriptedEvent("EventClicked", P.name .. ".KeyBindButton_clicked")
    145145        line:addChildWindow(button)
    146146        offset = offset + buttonWidth
     
    150150        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    151151        clear:setText("X")
    152         orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked")
     152        orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.name .. ".KeyBindClear_clicked")
    153153        line:addChildWindow(clear)
    154154        offset = offset + clearWidth + spaceWidth
  • code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua

    r6662 r6704  
    9595
    9696function P.MouseControlsBackButton_clicked(e)
    97     hideGUI(P.filename)
     97    hideGUI(P.name)
    9898end
    9999
  • code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua

    r6662 r6704  
    6767
    6868function P.MultiplayerBackButton_clicked(e)
    69     hideGUI(P.filename)
     69    hideGUI(P.name)
    7070end
    7171
  • code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua

    r6662 r6704  
    44
    55function P.MultiplayerOptionsBackButton_clicked(e)
    6     hideGUI(P.filename)
     6    hideGUI(P.name)
    77end
    88
  • code/branches/gamestates2/data/gui/scripts/QuestGUI.lua

    r6662 r6704  
    1111    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
    1212
    13     local window = questManager:getQuestGUI(P.filename)
     13    local window = questManager:getQuestGUI(P.name)
    1414
    1515    questsList:addChildWindow(window)
  • code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua

    r6662 r6704  
    2929
    3030function P.SettingsBackButton_clicked(e)
    31     hideGUI(P.filename)
     31    hideGUI(P.name)
    3232end
    3333
  • code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua

    r6662 r6704  
    3939
    4040function P.SingleplayerBackButton_clicked(e)
    41     hideGUI(P.filename)
     41    hideGUI(P.name)
    4242end
    4343
Note: See TracChangeset for help on using the changeset viewer.