Fix enabling/disabling of selfcast/focuscast

This commit is contained in:
Hendrik Leppkes
2008-10-30 09:17:33 +01:00
parent bb83d20d41
commit 3998774497
2 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -134,6 +134,6 @@ function ActionBar:GetHideHotkey()
end
function ActionBar:UpdateSelfCast()
self:ForAll("SetAttribute", "checkselfcast", Bartender4.db.profile.selfcastmodifier and true or nil)
self:ForAll("UpdateSelfCast")
self:UpdateStates()
end
+8 -6
View File
@@ -96,7 +96,8 @@ function Bartender4.Button:Create(id, parent)
button:SetAttribute("type", "action")
button:SetAttribute("action", absid)
button:SetAttribute("checkselfcast", true)
button:UpdateSelfCast()
--button:SetAttribute("useparent-unit", true)
@@ -278,12 +279,13 @@ function Button:RefreshStateAction(state)
self:UpdateRightClickSelfCast()
end
function Button:UpdateSelfCast()
self:SetAttribute("checkselfcast", Bartender4.db.profile.selfcastmodifier and true or nil)
self:SetAttribute("checkfocuscast", Bartender4.db.profile.focuscastmodifier and true or nil)
end
function Button:UpdateRightClickSelfCast()
if Bartender4.db.profile.selfcastrightclick then
self:SetAttribute("unit2", "player")
else
self:SetAttribute("unit2", nil)
end
self:SetAttribute("unit2", Bartender4.db.profile.selfcastrightclick and "player" or nil)
end
function Button:CalculateAction()