05-05-11, 12:48 PM | #1 |
Actionbar Taint Help
I've written my own bar mod though hack and slash of other addons and blind stupidity (I was a philosophy major and I have no coding experience), but I can't seem to figure out a way around this taint issue. When the bonus action bar fires, it wouldn't hide the action bar buttons behind them so if I had a bonus action bar with buttons 1, 3 and 4, and an action bar with buttons 1, 2, and 3, action bar button 2 would "show" in my bonus action bar where I could click it but not use my keybind (as that would be bonus action bar button 2). I solved this by adding a fader whenever the event fired for possess bar or bonus action bar but it causes taint. Is there anything anyone can suggest for a work around? Thanks in advance.
Edit: Line 120 is the problem, the UIFrameFadeOut. I had it just as a SetAlpha before but it looked odd with the bonus action bar buttons taking a moment to materialize while my action bar buttons vanished instantly. Code:
MainMenuBar:ClearAllPoints(); MainMenuBar:SetPoint("BOTTOMRIGHT", "UIParent", "BOTTOMLEFT", -100, 0); VehicleMenuBar:SetScale(.8) VehicleMenuBar:SetAlpha(.8) local b, bab, m1, m2, m3, m4; ActionButton1:ClearAllPoints(); ActionButton1:SetPoint("BOTTOM", "UIParent", "BOTTOM", -235, 4) BonusActionButton1:ClearAllPoints() BonusActionButton1:SetPoint("LEFT", "ActionButton1", "LEFT", 0, 0) MultiBarBottomLeftButton1:ClearAllPoints() MultiBarBottomLeftButton1:SetPoint("BOTTOMLEFT", "ActionButton1", "TOPLEFT", 0, 0) MultiBarBottomRightButton1:ClearAllPoints() MultiBarBottomRightButton1:SetPoint("BOTTOMLEFT", "MultiBarBottomLeftButton1", "TOPLEFT", 0, 0) MultiBarRightButton1:ClearAllPoints() MultiBarRightButton1:SetPoint("RIGHT", "UIParent", "RIGHT", 0, 249) MultiBarLeftButton1:ClearAllPoints() MultiBarLeftButton1:SetPoint("TOPRIGHT", "MultiBarRightButton1", "TOPLEFT", 0, 0) for i = 1, 12, 1 do b = _G["ActionButton"..i] b:SetScale(.8); b:SetAlpha(.8) bab = _G[ "BonusActionButton"..i ] bab:SetScale(.8); bab:SetAlpha(.8) m1 = _G["MultiBarBottomLeftButton"..i]; m1:SetScale(.8); m1:SetAlpha(.8) m2 = _G["MultiBarBottomRightButton"..i]; m2:SetScale(.8); m2:SetAlpha(.8) m3 = _G["MultiBarRightButton"..i]; m3:SetScale(.8); m3:SetAlpha(.8) m4 = _G["MultiBarLeftButton"..i]; m4:SetScale(.8); m4:SetAlpha(.8) if i > 1 then b:ClearAllPoints() b:SetPoint("LEFT", "ActionButton"..(i-1), "RIGHT", 6, 0) bab:ClearAllPoints() bab:SetPoint("LEFT", b, "LEFT") m1:ClearAllPoints(); m1:SetPoint("LEFT", "MultiBarBottomLeftButton"..(i-1), "RIGHT", 6, 0); m2:ClearAllPoints(); m2:SetPoint("LEFT", "MultiBarBottomRightButton"..(i-1), "RIGHT", 6, 0); m3:ClearAllPoints(); m3:SetPoint("TOP", "MultiBarRightButton"..(i-1), "BOTTOM", 0, -6); m4:ClearAllPoints(); m4:SetPoint("TOP", "MultiBarLeftButton"..(i-1), "BOTTOM", 0, -6); end end local g; PossessButton1:ClearAllPoints() PossessButton1:SetPoint("BOTTOMLEFT", "ActionButton1", "BOTTOMLEFT", 0, 0) for i = 1, 2, 1 do g = _G["PossessButton"..i]; g:SetScale(.8); g:SetAlpha(.8) if i > 1 then g:ClearAllPoints(); g:SetPoint("LEFT", "PossessButton"..(i-1), "RIGHT", 6, 0); end end UIPARENT_MANAGED_FRAME_POSITIONS["ShapeshiftBarFrame"] = nil ShapeshiftBarFrame:ClearAllPoints(); ShapeshiftBarFrame:SetParent("UIParent"); ShapeshiftBarFrame:SetScale(.8); ShapeshiftBarFrame:SetAlpha(.8); ShapeshiftBarFrame:SetPoint("RIGHT", "MultiBarBottomLeft", "LEFT", -300, 0); local p; PetActionButton1:ClearAllPoints() PetActionButton1:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOM", -177, 360) for i = 1, 10, 1 do p = _G["PetActionButton"..i]; p:SetScale(.8); p:SetAlpha(.8) if i > 1 then p:ClearAllPoints(); p:SetPoint("LEFT", "PetActionButton"..(i-1), "RIGHT", 6, 0); end end local DevBars = CreateFrame("Frame", "devbars", nil); devbars:Show(); devbars:RegisterEvent("UPDATE_BONUS_ACTIONBAR") devbars:SetScript("OnEvent", function(self) if (GetBonusBarOffset() > 0 ) then local x for i = 1, 12, 1 do x = _G["ActionButton"..i] UIFrameFadeOut(x, .5, .8, 0); end else local x for i = 1, 12, 1 do x = _G["ActionButton"..i] x:SetAlpha(.8); end end end ); Code:
5/5 13:07:43.327 An action was blocked in combat because of taint from DevKiller - ActionButton12:Show() 5/5 13:07:43.327 Interface\FrameXML\UIParent.lua:2389 UIFrameFade() 5/5 13:07:43.327 Interface\FrameXML\UIParent.lua:2420 UIFrameFadeOut() 5/5 13:07:43.327 Interface\AddOns\DevKiller\ActionBar.lua:120 Last edited by Descartes : 05-05-11 at 12:50 PM. |
|
WoWInterface » Developer Discussions » Lua/XML Help » Actionbar Taint Help |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|