[Orxonox-commit 2003] r6720 - code/branches/gamestates2/data/gui/scripts

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Apr 13 15:58:56 CEST 2010


Author: rgrieder
Date: 2010-04-13 15:58:56 +0200 (Tue, 13 Apr 2010)
New Revision: 6720

Modified:
   code/branches/gamestates2/data/gui/scripts/AudioMenu.lua
   code/branches/gamestates2/data/gui/scripts/GUISheet.lua
   code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua
   code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua
   code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua
   code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua
   code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua
   code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua
Log:
"init" lua function --> "onLoad" to make it clear that it is a user function.

Modified: code/branches/gamestates2/data/gui/scripts/AudioMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/AudioMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/AudioMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("AudioMenu")
 
-function P.init()
+function P.onLoad()
     soundMgr = orxonox.SoundManager:getInstance()
     block = false
     masterscrollbar_active = false

Modified: code/branches/gamestates2/data/gui/scripts/GUISheet.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/GUISheet.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/GUISheet.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -12,8 +12,7 @@
 end
 
 -- Override this function if you need to do work on load
--- TODO: rename to onLoad
-function P:init()
+function P:onLoad()
 end
 
 -- hide function for the GUI
@@ -37,7 +36,7 @@
     -- Hide it at first
     self:hide()
     -- Allow sheets to do some work upon loading
-    self:init()
+    self:onLoad()
     return self
 end
 

Modified: code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("GameplayMenu")
 
-function P.init()
+function P.onLoad()
     dropdown = winMgr:getWindow("orxonox/ThemeCombobox")
     local themeList = {}
     table.insert(themeList, "Theme 1")

Modified: code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("GraphicsMenu")
 
-function P.init()
+function P.onLoad()
     block = true
     file = orxonox.PathConfig:getConfigPathString() .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
     search_mode = 0

Modified: code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("KeyBindMenu")
 
-function P.init()
+function P.onLoad()
 
     commandList = {}
     table.insert(commandList, "fire 0")

Modified: code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("MouseControlsMenu")
 
-function P.init()
+function P.onLoad()
     block = false
     mousenormalscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalScrollbar"),"CEGUI::Scrollbar")
     mousederivescrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseDeriveScrollbar"),"CEGUI::Scrollbar")

Modified: code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("MultiplayerMenu")
 
-function P.init()
+function P.onLoad()
     listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
     preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     orxonox.LevelManager:getInstance():compileAvailableLevelList()

Modified: code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua	2010-04-13 13:56:17 UTC (rev 6719)
+++ code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua	2010-04-13 13:58:56 UTC (rev 6720)
@@ -2,7 +2,7 @@
 
 local P = createMenuSheet("SingleplayerMenu")
 
-function P.init()
+function P.onLoad()
     listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
     preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     orxonox.LevelManager:getInstance():compileAvailableLevelList()




More information about the Orxonox-commit mailing list