Thread Tools Display Modes
04-26-16, 02:33 PM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
AnimationGroup question

Confession: I have never dabbled with Blizzard's animation system. It confuses me greatly. Therefore, to the experts!

Is it possible to animate text created with CreateFontStrong, SetFont, SetText to shine or glint like bright metal does under the sun? How can this be accomplished?
  Reply With Quote
04-26-16, 05:21 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
If you're just moving a shine texture across the text, that's certainly doable. Manipulating colors and gradients would still need to be done on Lua side as the animation system isn't that fancy. It can only handle various movement, scaling, and fading.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-26-16, 07:47 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Hmm, okay. So that means I would need a shine texture. Does one exist within WoW, or is that something that needs to be created?

This is my frame creation code. It is just the base, as I haven't populated it except for the title text. The good news is that the title text is the only part I want shiny or glittery. That would be line 31.

The plan eventually is to have have "MyrroUI" at the top in gold, version in silver below that, and at the bottom of the frame, "Installer" in bronze, all glittering, but baby steps.
Lua Code:
  1. -- if SVN checkout, replace version text --------
  2. if version:match("@") then
  3.     version = L["Developer"]
  4. end
  5. local addonName = "MyrroUI " .. version
  6.  
  7. function MyrroUI:CreateInstaller()
  8.     -- create Installer window ----------------------
  9.     local width = UIParent:GetWidth() / 2
  10.     local height = UIParent:GetHeight() / 2
  11.     local f = f or CreateFrame("Frame", "MyrroUIInstallerFrame")
  12.     f:SetFrameStrata("MEDIUM")
  13.     f:SetMovable(true)
  14.     f:SetUserPlaced(false)
  15.     f:SetClampedToScreen(true)
  16.     f:SetSize(width, height)
  17.     f:ClearAllPoints()
  18.     f:SetPoint("CENTER", UIParent, "CENTER")
  19.  
  20.     -- frame backdrop ---------------------------
  21.     f:SetBackdrop({
  22.         bgFile = LSM:Fetch("background", "Blizzard Marble"),
  23.         edgeFile = LSM:Fetch("border", "Blizzard Achievement Wood"),
  24.         tile = false, tileSize = 0, edgeSize = 100,
  25.         insets = {left = 0, right = 0, top = 0, bottom = 0}
  26.     })
  27.    
  28.     -- colour it --------------------------------
  29.     f:SetBackdropColor(1, 1, 1, 0.75)
  30.     f:SetBackdropBorderColor(0, 0, 0, 0.75)
  31.    
  32.     -- "MyrroUI version" ------------------------
  33.     local fo = f:CreateFontString()
  34.     fo:SetFont(LSM:Fetch("font", "Roman"), 24, nil)
  35.     -- fo:SetTextColor(255, 215, 0, 1)
  36.     fo:SetPoint("BOTTOM", f, "TOP", 0, -26)
  37.     fo:SetText(addonName)
  38.     fo:SetTextColor(255, 215, 0, 1)
  39.    
  40.     return f
  41. end
  Reply With Quote
04-26-16, 08:46 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
I'm sure there are a few shine textures in the default UI. Off the top of my head, combo points, action button cooldown frames, and the objective tracker uses them to name a few.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » AnimationGroup question

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