Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-15-18, 06:38 PM   #1
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Smile Fading Textures

I would like to fade a texture in, and then out, like a splash - I did it a while ago but cannot remember how. Doesn't have something to do with animation?

Please advise.

I added the Lua below for reference, I am really unsure how to get this to fade in/out. (edit)

Lua Code:
  1. local addonName, addonData = ...
  2.  
  3. local InstallerLogo = CreateFrame("Frame", addonName.."ILogo", UIParent);
  4. InstallerLogo.texture = InstallerLogo:CreateTexture(nil, "HIGH");
  5. InstallerLogo.texture:SetTexture("Interface\\Addons\\PawsUI\\Art\\Splash.tga");
  6. InstallerLogo.texture:SetAllPoints();
  7. InstallerLogo:RegisterEvent("PLAYER_ENTERING_WORLD");
  8. InstallerLogo:SetScript("OnEvent", function(self,event,...)
  9.     self:SetSize(850, 480);
  10.     self:SetPoint("CENTER");
  11. end)
  12. InstallerLogo:SetMovable(true)
  13. InstallerLogo:EnableMouse(true)
  14. InstallerLogo:RegisterForDrag("LeftButton")
  15. InstallerLogo:SetScript("OnDragStart", InstallerLogo.StartMoving)
  16. InstallerLogo:SetScript("OnDragStop", InstallerLogo.StopMovingOrSizing)
  17. -----------------------------------------------------
  18. InstallerLogo.animation = InstallerLogo:CreateAnimationGroup()
  19.  
  20. local a1 = InstallerLogo.animation:CreateAnimation("Alpha")
  21. a1:SetFromAlpha(0)
  22. a1:SetDuration(1)
  23. a1:SetToAlpha(1)
  24. InstallerLogo.animation:SetToFinalAlpha(true)

This makes the Logo not visible but does not fade. Perhaps it does fade but is immediate?

Last edited by candrid : 08-15-18 at 07:53 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Fading Textures

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off