Quantcast glow border + spark - WoWInterface
Thread Tools Display Modes
04-20-18, 02:04 PM   #1
GreyFox777
A Wyrmkin Dreamwalker
Join Date: Jan 2017
Posts: 54
glow border + spark

Can someone help me to add an glowing border and spark texture please?

-- Castbar generator
function core:CreateCastbar(self)
local castbar = CreateFrame("StatusBar", "oUF_LumenCastBar", self)
castbar:SetStatusBarTexture(m.textures.status_texture)
castbar:GetStatusBarTexture():SetHorizTile(false)
castbar:SetFrameStrata("HIGH")
castbar:SetToplevel(true)

castbar.bg = castbar:CreateTexture(nil, 'BORDER')
castbar.bg:SetAllPoints()
castbar.bg:SetAlpha(0.3)
castbar.bg:SetTexture(m.textures.bg_texture)
castbar.bg:SetColorTexture(1/3, 1/3, 1/3)

castbar.Text = castbar:CreateFontString(nil, "OVERLAY")
castbar.Text:SetTextColor(1, 1, 1)
castbar.Text:SetShadowOffset(1, -1)
castbar.Text:SetJustifyH("LEFT")
castbar.Text:SetHeight(12)

castbar.Time = castbar:CreateFontString(nil, "OVERLAY")
castbar.Time:SetTextColor(1, 1, 1)
castbar.Time:SetJustifyH("RIGHT")

castbar.Icon = castbar:CreateTexture(nil, 'ARTWORK')
castbar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
  Reply With Quote
04-22-18, 05:37 PM   #2
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 264
You can check my code here to see how to do it: https://github.com/greven/oUF_lumen/.../core.lua#L120

Lua Code:
  1. -- Create Glow Border
  2. function core:setglowBorder(self)
  3.   self.Glowborder = CreateFrame("Frame", nil, self)
  4.   self.Glowborder:SetFrameLevel(0)
  5.   self.Glowborder:SetPoint("TOPLEFT", self, "TOPLEFT", -6, 6)
  6.   self.Glowborder:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 6, -6)
  7.   self.Glowborder:SetBackdrop({bgFile = m.textures.white_square, edgeFile =  m.textures.glow_texture,
  8.     tile = false, tileSize = 16, edgeSize = 4, insets = {left = -4, right = -4, top = -4, bottom = -4}})
  9.   self.Glowborder:SetBackdropColor(0, 0, 0, 0)
  10.   self.Glowborder:SetBackdropBorderColor(0, 0, 0, 1)
  11. end

And my Castbar module: https://github.com/greven/oUF_lumen/...ts/castbar.lua

This code might need some clean up but the principle still applies.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
04-22-18, 05:38 PM   #3
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 243
As well you can use anything from here as well. Any questions just ask.

https://github.com/Kkthnx-WoW/Kkthnx...s/Castbars.lua
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » glow border + spark

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