Bumping this, as I'm trying to figure out how to use this glow options by adding it into Textured Button addon.
I found this in Gather Button addon,the function to trigger the flame glow border when a cultivating plot is ready :
Code: Select all
function GatherButton.SetGlow(button, glowLevel)
if button ~= nil then
local GLOW_ANIM = 6
local glowFrame = button.m_Windows[GLOW_ANIM]
if glowLevel == 0 then
glowFrame:StopAnimation(true)
glowFrame:Show(false)
else
glowFrame:Show(true)
glowFrame:StopAnimation(true)
glowFrame:SetAnimationTexture(button.m_GlowBase .. glowLevel)
glowFrame:StartAnimation(0, true, false, 0)
button.m_GlowLevel = glowLevel
end
end
end
Now, I wish to add a selector option into Textured Button, but the "Activated Ability" state is not currently listed :
Code: Select all
-- Sets the textures for the given button
function TexturedButtons.TexturizeButton(button, override)
if (not TexturedButtons.IsLoaded or (not TexturedButtons.IsEnabled and not override)) then return end
local texture = nil;
if (buttonTextureForSlotType) then
local slotType = GetSlotType(button.m_HotBarSlot);
texture = buttonTextureForSlotType[slotType] or buttonTexture;
else
texture = buttonTexture;
end
SetButtonTexture(button, Button.ButtonState.NORMAL, texture.Textures.Normal, texture.Slices.Normal);
SetButtonTexture(button, Button.ButtonState.HIGHLIGHTED, texture.Textures.Highlighted, texture.Slices.Highlighted);
SetButtonTexture(button, Button.ButtonState.PRESSED, texture.Textures.Pressed, texture.Slices.Pressed);
SetButtonTexture(button, Button.ButtonState.PRESSED_HIGHLIGHTED, texture.Textures.PressedHighlighted, texture.Slices.PressedHighlighted);
end
Any insight or help about how to add a customized texture that will replace the default rotating glow by the AM/Sham flame one on activated ability ?