diff ReAction.lua @ 77:da8ba8783924

- added revision updater to each code file - Changed button/bar class mechanic to metatable-based - Changed buttons to live within a sub-frame, to play nicely between show-empty-buttons and hidestates - bar frame is now available only via accessor - Changed some semantics with AddButton/PlaceButton - Cleaned up action buttons options, fixed hide-when-empty option - moved show-action-ID-label as a button method - converted drag overlay from nested-frame to :Raise() - fixed ReAction:SetConfigMode() to not call event when mode doesn't change - Fixed ordering for dynamic state tab (always last)
author Flick <flickerstreak@gmail.com>
date Mon, 23 Jun 2008 22:27:50 +0000
parents 06cd74bdc7da
children 57f8151ea0f0
line wrap: on
line diff
--- a/ReAction.lua	Thu Jun 19 17:48:57 2008 +0000
+++ b/ReAction.lua	Mon Jun 23 22:27:50 2008 +0000
@@ -253,6 +253,13 @@
 
 
 ------ API ------
+function ReAction:UpdateRevision(str)
+  local revision = tonumber(str:match("%d+"))
+  if revision and revision > ReAction.revision then
+    ReAction.revision = revision
+  end
+end
+
 function ReAction:UserError(msg)
   -- any user errors should be flashed to the UIErrorsFrame
   UIErrorsFrame:AddMessage(msg)
@@ -441,8 +448,10 @@
 end
 
 function ReAction:SetConfigMode( mode )
-  private.configMode = mode
-  callbacks:Fire("OnConfigModeChanged", mode)
+  if mode ~= private.configMode then
+    private.configMode = mode
+    callbacks:Fire("OnConfigModeChanged", mode)
+  end
 end
 
 function ReAction:GetConfigMode()