diff classes/Button.lua @ 123:943eed2c7def

Fixes for new ActionButton implementation
author Flick <flickerstreak@gmail.com>
date Mon, 23 Feb 2009 19:41:11 +0000
parents a2d2f23137c8
children 0c5017f6062d
line wrap: on
line diff
--- a/classes/Button.lua	Mon Feb 23 18:56:57 2009 +0000
+++ b/classes/Button.lua	Mon Feb 23 19:41:11 2009 +0000
@@ -111,13 +111,13 @@
   if not poolID or not maxID then
     error("AcquireActionID: must setup pool first with SetActionIDPool")
   end
-  local pool = pools[poolID]
+  local pool = idPools[poolID]
   if not pool then
     pool = { nWraps = 0, useCount = { } }
     for i = 1, maxID do
       pool.useCount[i] = 0
     end
-    pools[poolID] = pool
+    idPools[poolID] = pool
   end
   local useCount = pool.useCount
   if id == nil then
@@ -159,7 +159,7 @@
   if not poolID  then
     error("ReleaseActionID: must setup pool first with SetActionIDPool")
   end
-  local pool = pools[poolID]
+  local pool = idPools[poolID]
   if pool and id and pool.useCount[id] then
     pool.useCount[id] = pool.useCount[id] - 1
     pool.nWraps = min(pool.useCount[id], pool.nWraps)