[Orxonox-commit 844] r2212 - media/gui/scripts

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Jul 27 22:35:37 CEST 2009


Author: rgrieder
Date: 2009-07-27 22:35:37 +0200 (Mon, 27 Jul 2009)
New Revision: 2212

Modified:
   media/gui/scripts/PickupInventory.lua
   media/gui/scripts/gui.lua
   media/gui/scripts/inGameTest.lua
   media/gui/scripts/loadGUI_3.lua
   media/gui/scripts/mainmenu_2.lua
   media/gui/scripts/mainmenu_3.lua
   media/gui/scripts/mainmenu_4.lua
Log:
svn eol-style, so I don't see the mysterious line ending characters in vim ;)

Modified: media/gui/scripts/PickupInventory.lua
===================================================================
--- media/gui/scripts/PickupInventory.lua	2009-07-25 23:04:34 UTC (rev 2211)
+++ media/gui/scripts/PickupInventory.lua	2009-07-27 20:35:37 UTC (rev 2212)
@@ -4,20 +4,20 @@
 PickupInventory = P
 
 P.filename = "PickupInventory"
-P.layoutString = "PickupInventory.layout"
-
-P.lastEquipmentCount_ = 0
-P.lastUsableCount_ = 0
-P.currentUsableID_ = 0
-
--- events
-function P:frmUpdate(e)
-    local equipCount = orxonox.PickupInventory:getEquipmentCount()
-    local usableCount = orxonox.PickupInventory:getUsableCount()
-    
-    if equipCount ~= self.lastEquipmentCount_ or usableCount ~= self.lastUsableCount_ then
-        self:updateTabs()
-    end
+P.layoutString = "PickupInventory.layout"
+
+P.lastEquipmentCount_ = 0
+P.lastUsableCount_ = 0
+P.currentUsableID_ = 0
+
+-- events
+function P:frmUpdate(e)
+    local equipCount = orxonox.PickupInventory:getEquipmentCount()
+    local usableCount = orxonox.PickupInventory:getUsableCount()
+    
+    if equipCount ~= self.lastEquipmentCount_ or usableCount ~= self.lastUsableCount_ then
+        self:updateTabs()
+    end
 end
 
 function P.update(e)
@@ -26,38 +26,38 @@
 
 function P.itemClicked(e)
     loadedGUIs["PickupInventory"]:mItemClicked(e)
-end
-
-function P:mItemClicked(e)
-    local w = CEGUI.toWindowEventArgs(e).window
-    local name = w:getName()
-    local t = name:sub(25, 27)
-    local i = name:sub(29)
-    
-    if t == "equ" then
-        
-    end
-    
-    if t == "use" then
-        if self.currentUsableID_ >= 0 then
-            winMgr:getWindow("orxonox/Inventory/Title/use/" .. self.currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF")
-        end
-        orxonox.PickupInventory:selectUsable(tonumber(i))
-        self.currentUsableID_ = tonumber(i)
-        winMgr:getWindow("orxonox/Inventory/Title/use/" .. i):setProperty("TextColours", "tl:FFFF4444 tr:FFFF4444 bl:FFFF4444 br:FFFF4444")
-    end
-end
-
--- methods
-function P:updateTabs()
-    local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment")
-    local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable")
-    orxonox.PickupInventory:getSingleton():clearInventory(winMgr, eqWin, usWin)
-    orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin)
-    
-    self.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
-    self.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
-    self.lastUsableCount_ = orxonox.PickupInventory:getUsableCount()
 end
 
-return PickupInventory
+function P:mItemClicked(e)
+    local w = CEGUI.toWindowEventArgs(e).window
+    local name = w:getName()
+    local t = name:sub(25, 27)
+    local i = name:sub(29)
+    
+    if t == "equ" then
+        
+    end
+    
+    if t == "use" then
+        if self.currentUsableID_ >= 0 then
+            winMgr:getWindow("orxonox/Inventory/Title/use/" .. self.currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF")
+        end
+        orxonox.PickupInventory:selectUsable(tonumber(i))
+        self.currentUsableID_ = tonumber(i)
+        winMgr:getWindow("orxonox/Inventory/Title/use/" .. i):setProperty("TextColours", "tl:FFFF4444 tr:FFFF4444 bl:FFFF4444 br:FFFF4444")
+    end
+end
+
+-- methods
+function P:updateTabs()
+    local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment")
+    local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable")
+    orxonox.PickupInventory:getSingleton():clearInventory(winMgr, eqWin, usWin)
+    orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin)
+    
+    self.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
+    self.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
+    self.lastUsableCount_ = orxonox.PickupInventory:getUsableCount()
+end
+
+return PickupInventory


Property changes on: media/gui/scripts/PickupInventory.lua
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: media/gui/scripts/gui.lua
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: media/gui/scripts/inGameTest.lua
===================================================================
--- media/gui/scripts/inGameTest.lua	2009-07-25 23:04:34 UTC (rev 2211)
+++ media/gui/scripts/inGameTest.lua	2009-07-27 20:35:37 UTC (rev 2212)
@@ -1 +1 @@
-layoutPath = "InGameTest.layout"
+layoutPath = "InGameTest.layout"


Property changes on: media/gui/scripts/inGameTest.lua
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: media/gui/scripts/loadGUI_3.lua
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: media/gui/scripts/mainmenu_2.lua
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: media/gui/scripts/mainmenu_3.lua
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: media/gui/scripts/mainmenu_4.lua
___________________________________________________________________
Added: svn:eol-style
   + native




More information about the Orxonox-commit mailing list