Originally Posted by Duugu
Thank you. But ... hm ... it's about rotating textures. I'm a bit lost. :/ Could you please be more specific? Which part of it?
|
Lua Code:
local rotateme = function(texture,width,height,scale,anchorframe,framelevel,texr,texg,texb,alpha,duration,side,blendmode,point,pointx,pointy)
local h = CreateFrame("Frame",nil,anchorframe)
h:SetHeight(height)
h:SetWidth(width)
h:SetPoint(point,pointx,pointy)
h:SetScale(scale)
h:SetFrameLevel(framelevel)
local t = h:CreateTexture()
t:SetAllPoints(h)
t:SetTexture("Interface\\AddOns\\yourTextures\\"..texture)
t:SetBlendMode(blendmode)
t:SetVertexColor(texr,texg,texb,alpha)
h.t = t
local ag = h:CreateAnimationGroup()
h.ag = ag
local a1 = h.ag:CreateAnimation("Rotation")
a1:SetDegrees(6)
a1:SetDuration(1)
h.ag.a1 = a1
h.ag:SetLooping("REPEAT") --repeat this OVER AND OVER?!
return h
end
local f = rotateme(...)
f.ag:Play()
--adjust values
--f.ag.a1:SetDegrees(20)
--f.a1:SetDuration(10)
--f.ag:SetLooping("REPEAT")
If i get this right this means you can rotate frames instead of textures with animationgroups, means you don't have to rotate your textures one by one, just rotate the frame and tada. I havn't tested this tho.