/trunk/Core
} |
end |
function SliceCommander:getIconSpellSound(spell) |
return { |
Tick3 = SliceCommander:getIconSoundSetting(L["Alert - 3 sec"], L["Alert 3 secondes before fade"], spell, 'alert3'), |
Tick2 = SliceCommander:getIconSoundSetting(L["Alert - 2 sec"], L["Alert 2 secondes before fade"], spell, 'alert2'), |
Tick1 = SliceCommander:getIconSoundSetting(L["Alert - 1 sec"], L["Alert 1 secondes before fade"], spell, 'alert1'), |
Apply3 = SliceCommander:getIconSoundSetting(L["Refresh - 3 sec"], L["Refresh 3 secondes before fade"], spell, 'refresh3'), |
Apply2 = SliceCommander:getIconSoundSetting(L["Refresh - 2 sec"], L["Refresh 2 secondes before fade"], spell, 'refresh2'), |
Apply1 = SliceCommander:getIconSoundSetting(L["Refresh - 1 sec"], L["Refresh 1 secondes before fade"], spell, 'refresh1'), |
Applied = SliceCommander:getIconSoundSetting(L["Applied"], string.format(L["%s is applied"], SC_SPELL[spell]), spell, 'applied'), |
Expire = SliceCommander:getIconSoundSetting(L["Expired"], string.format(L["%s buff expire"], SC_SPELL[spell]), spell, 'expired') |
} |
end |
function SliceCommander:getEnergyMarkerSetting(spec, id) |
local maxi = 150 |
if spec == 1 then |
} |
end |
function SliceCommander:getIconSoundSetting(name, description, spell, id) |
return { |
order = SliceCommander:getOrder(), |
name = name, |
desc = description, |
type = "select", |
dialogControl = 'LSM30_Sound', |
values = LSM:HashTable("sound"), |
set = function(info,val) |
_G['SC'].ICONS[spell]['sound'][id] = val |
end, |
get = function(info) |
if _G['SC'].ICONS[spell]['sound'] == nil then _G['SC'].ICONS[spell]['sound'] = {} end |
if _G['SC'].ICONS[spell]['sound'][id] == nil then _G['SC'].ICONS[spell]['sound'][id] = 'None' end |
return _G['SC'].ICONS[spell]['sound'][id] |
end |
} |
end |
function SliceCommander:getShortcutSetting(sc_categ, sub_categ, spell, label) |
if label == nill then |
label = SC_SPELL[spell] |
Shortcut_AR = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "AR"), |
Shortcut_RB = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "RB"), |
Shortcut_KIRCD = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "KIRCD"), |
Shortcut_AUD = SliceCommander:getShortcutSetting("SliceCommander_Outlaw", "Talents", "AUD"), |
EnergySetting = SliceCommander:getEnergyMarkerSettings(1), |
GS = SliceCommander:getSpellCDSettings('GS'), |
KSPCD = SliceCommander:getCDSettings('KSPCD'), |
LD = SliceCommander:getSpellSettings('LD'), |
) |
}, |
KIRCD = SliceCommander:getCDSettings('KIRCD'), |
AUD = { |
name = SC_SPELL['AUD'], |
type = "group", |
order = SliceCommander:getOrder(), |
args = SliceCommander_TableMerge( |
{ |
toggleAUD = { |
order = SliceCommander:getOrder(), |
name = L["Show Audacity icon"], |
desc = L["Show audacity icon when ambush utilisation without stealth is possible."], |
type = "toggle", |
set = function(info,val) _G['SC'].SET.display.AUD = val end, |
get = function(info) return _G['SC'].SET.display.AUD end |
}, |
AUD_soundHeader = { |
order = SliceCommander:getOrder(), |
name = L["Sound settings"], |
type = "header" |
} |
}, |
SliceCommander:getIconSpellSound('AUD') |
) |
}, |
} |
} |
} |
end, |
get = function(info) return _G['SC'].SET.PixelPerfect end |
}, |
skinEnable = { |
order = SliceCommander:getOrder(), |
name = L["Enable border"], |
desc = L["Add a border like the one on Tukui."], |
type = "toggle", |
set = function(info,val) |
_G['SC'].SET.skin = val |
SliceCommander:ApplySkin(val) |
SliceCommander:ShowHideBorder(val) |
end, |
get = function(info) return _G['SC'].SET.skin end |
}, |
headerDisplaySetting = {--CDisplay Setting |
order = SliceCommander:getOrder(), |
name = L["Display Setting"], |
_G['SC'].order = 0 |
_G['SC'].maxPos = 0 |
_G['SC'].maxCDPos = 0 |
_G['SC'].previouKyrCount = 0 |
_G['SC'].previouKyrCount = {false, false, false, false, false} |
SliceCommander:TestValueOptions() |
SliceCommander:SetEssence() |
SliceCommander:InitConfigurationTable() |
end |
function SliceCommander:TestKYRIAN() |
local _, spellId |
local count = 0 |
local _, spellId, count, displayKyrCP |
local cpCounts = {} |
local kyrBuff = { |
[323558] = 2, -- 2nd CP |
[323559] = 3, -- 3rd CP |
[323560] = 4, -- 4th CP |
[354838] = 5, -- 5th CP |
[SC_SPELLID['ER2']] = 2, -- 2nd CP |
[SC_SPELLID['ER3']] = 3, -- 3rd CP |
[SC_SPELLID['ER4']] = 4, -- 4th CP |
[SC_SPELLID['ER5']] = 5, -- 5th CP |
} |
for k, v in pairs(kyrBuff) do |
_, _, _, _, _, _, _, _, _, spellId = SliceCommander:UnitAura("player", k, "HELPFUL PLAYER") |
if spellId then |
count = v |
cpCounts[v] = true |
else |
cpCounts[v] = false |
end |
end |
if count ~= _G['SC'].previouKyrCount then |
if _G['SC'].previouKyrCount > 0 then |
_G['SC'].BARS['CP']['obj'].combos[_G['SC'].previouKyrCount].anim:Stop() |
for count,displayKyrCP in pairs(cpCounts) do |
if displayKyrCP ~= _G['SC'].previouKyrCount[count] then |
if _G['SC'].previouKyrCount[count] then |
_G['SC'].BARS['CP']['obj'].combos[count].anim:Stop() |
end |
if displayKyrCP then |
_G['SC'].BARS['CP']['obj'].combos[count].anim:Play() |
end |
_G['SC'].previouKyrCount[count] = displayKyrCP |
end |
if count > 0 then |
print(count) |
_G['SC'].BARS['CP']['obj'].combos[count].anim:Play() |
end |
_G['SC'].previouKyrCount = count |
end |
end |
for k, v in pairs(_G['SC'].BARS) do |
if _G['SC'].BARS[k]['type'] ~= nil then--1=BUFF 2=DEBUFF 3=SELF DEBUF |
if _G['SC'].BARS[k]['type'] == 1 or _G['SC'].BARS[k]['type'] == 2 or _G['SC'].BARS[k]['type'] == 3 then |
SliceCommander:UpdateBar(k) |
SliceCommander:UpdateBar(k, 'BARS') |
elseif _G['SC'].BARS[k]['type'] == 4 then--CD |
SliceCommander:AbilityCDBar(k) |
elseif _G['SC'].BARS[k]['type'] == 5 then--CHARGE CD |
end |
end |
end |
for k, v in pairs(_G['SC'].ICONS) do |
if _G['SC'].ICONS[k]['type'] ~= nil then--1=BUFF 2=DEBUFF 3=SELF DEBUF |
if _G['SC'].ICONS[k]['type'] == 1 or _G['SC'].ICONS[k]['type'] == 2 or _G['SC'].ICONS[k]['type'] == 3 then |
SliceCommander:UpdateBar(k, 'ICONS') |
elseif _G['SC'].ICONS[k]['type'] == 4 then--CD |
--SliceCommander:AbilityCDIcon(k) |
elseif _G['SC'].ICONS[k]['type'] == 5 then--CHARGE CD |
--SliceCommander:ChargeAbilityCDBIcon(k) |
elseif _G['SC'].ICONS[k]['type'] == 6 then--MULTIPLE BUFF BAR |
--SliceCommander:MultipleAbilityIcon(k) |
end |
end |
end |
SliceCommander:TestKYRIAN()--DP Icon |
SliceCommander:TestDP()--DP Icon |
if _G['SC'].SET.IsLocked == false then |
frame:StopMovingOrSizing() |
frame:SetUserPlaced(false) |
_G['SC'].OTHER[frame:GetName()]['position'].point, |
_G['SC'].OTHER[frame:GetName()]['position'].relativeTo, |
_G['SC'].OTHER[frame:GetName()]['position'].relativePoint, |
_G['SC'].OTHER[frame:GetName()]['position'].xOfs, |
_G['SC'].OTHER[frame:GetName()]['position'].yOfs = frame:GetPoint(); |
local item |
if frame.type == 'OTHER' then |
item = _G['SC'].OTHER |
else |
item = _G['SC'].ICONS |
end |
item[frame:GetName()]['position'].point, |
item[frame:GetName()]['position'].relativeTo, |
item[frame:GetName()]['position'].relativePoint, |
item[frame:GetName()]['position'].xOfs, |
item[frame:GetName()]['position'].yOfs = frame:GetPoint(); |
end |
end |
end |
function SliceCommander:InitIcon() |
_G['SC'].OTHER['POISON']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_dualweild", 'POISON')--Create poison icon warning when it left 5minute or less on the current timer |
_G['SC'].OTHER['POISON']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_dualweild", 'POISON', 'OTHER')--Create poison icon warning when it left 5minute or less on the current timer |
_G['SC'].OTHER['POISON']['obj']:Show() |
_G['SC'].OTHER['POISON']['obj'].button = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")--Create button to reaply poison |
_G['SC'].OTHER['POISON']['obj'].button:SetFrameStrata("HIGH") |
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("unit", "player") |
_G['SC'].OTHER['POISON']['obj'].button:SetAttribute("type", "spell") |
_G['SC'].OTHER['POISON']['obj'].button:EnableMouse(false) |
_G['SC'].ICONS['AUD']['obj'] = SliceCommander:NewIcon("Interface\\Icons\\ability_rogue_ambush", 'AUD', 'ICONS')--Create poison icon warning when it left 5minute or less on the current timer |
_G['SC'].ICONS['AUD']['obj']:Show() |
end |
function SliceCommander:InitGCDBar() |
end |
function SliceCommander:DisableIcon(obj, val) |
for i,v in pairs(obj.iconBorder) do |
v:Hide() |
end |
obj:SetMinMaxValues(0, val)--Threat value should be between 0 and val |
end |
for i = 1, maxCP do |
_G['SC'].BARS['CP']['obj'].combos[i].bg:SetVertexColor(unpack(_G['SC'].SET.CP[maxCP][i])) |
_G['SC'].BARS['CP']['obj'].combos[i].border[2]:SetBackdropColor(unpack(_G['SC'].V.wColor)) |
end |
for i,v in pairs(_G['SC'].BARS) do |
_G['SC'].Spark = {} |
end |
function SliceCommander:ShowHideBorder(visible) |
if visible then |
for i,v in pairs(VTimerEnergy.border) do |
v:Show() |
end |
for i,v in pairs(_G['SC'].BARS) do |
if i ~= "CP" then |
for j,w in pairs(v['obj'].border) do |
w:Show() |
end |
if i ~= "THREAT" and i ~= "HEALTH" and i ~= "THEALTH" then |
for j,w in pairs(v['obj'].iconBorder) do |
w:Show() |
end |
end |
end |
end |
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do |
for j,w in pairs(v.border) do |
w:Show() |
end |
end |
else |
for i,v in pairs(VTimerEnergy.border) do |
v:Hide() |
end |
for i,v in pairs(_G['SC'].BARS) do |
if i ~= "CP" then |
for j,w in pairs(v['obj'].border) do |
w:Hide() |
end |
if i ~= "THREAT" and i ~= "CP" and i ~= "HEALTH" and i ~= "THEALTH" then |
for j,w in pairs(v['obj'].iconBorder) do |
w:Hide() |
end |
end |
end |
end |
for i,v in pairs(_G['SC'].BARS['CP']['obj'].combos) do |
for j,w in pairs(v.border) do |
w:Hide() |
end |
end |
end |
end |
function SliceCommander:ApplyConf() |
SliceCommander:LockCkecked(_G['SC'].SET.IsLocked) |
SliceCommander:SetTimersHeight(_G['SC'].SET.TimerHeight) |
SliceCommander:FrameOpacity(_G['SC'].SET.FrameOpacity) |
SliceCommander:SetTransparency(_G['SC'].SET.EnergyTrans) |
SliceCommander:ApplySkin(_G['SC'].SET.skin) |
SliceCommander:ShowHideBorder(_G['SC'].SET.skin) |
SliceCommander:ACTIVE_TALENT_GROUP_CHANGED() |
end |
SliceCommanderFrame:EnableMouse(false) |
_G['SC'].OTHER['POISON']['obj']['moveframe']:SetAlpha(0) |
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(false) |
_G['SC'].ICONS['AUD']['obj']['moveframe']:SetAlpha(0) |
_G['SC'].ICONS['AUD']['obj']['moveframe']:EnableMouse(false) |
_G['SC'].SET.IsLocked = true |
else |
SliceCommander:SetTransparency(100) |
_G['SC'].OTHER['POISON']['obj']['moveframe']:EnableMouse(true) |
_G['SC'].OTHER['POISON']['obj']:SetAlpha(1) |
_G['SC'].OTHER['POISON']['obj']:Show() |
_G['SC'].ICONS['AUD']['obj']['moveframe']:SetAlpha(.5) |
_G['SC'].ICONS['AUD']['obj']['moveframe']:EnableMouse(true) |
--_G['SC'].ICONS['AUD']['obj']:SetAlpha(1) |
--_G['SC'].ICONS['AUD']['obj']:Show() |
_G['SC'].SET.IsLocked = false |
SliceCommander:StaticPopup_Show('CONFIG_UNLOCK') |
end |
end |
for i,v in pairs(_G['SC'].BARS) do |
if v['expire'] ~= nil and i ~= 'THREAT' and i ~= 'CP' and i ~= "HEALTH" and i ~= "THEALTH" then |
SliceCommander:SetSizeBorder(w-h, 0, v['obj'].border) |
v['obj']:SCWidth(w-h) |
end |
end |
VTimerEnergy:SCWidth(w) |
SliceCommander:SetSizeBorder(w, 0, VTimerEnergy.border) |
SliceCommanderFrame:SCWidth(w+16) |
_G['SC'].OTHER['AS']['obj']:SCWidth(w) |
_G['SC'].BARS['CP']['obj']:SCWidth(w) |
_G['SC'].BARS['THREAT']['obj']:SCWidth(w) |
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['THREAT']['obj'].border) |
_G['SC'].BARS['HEALTH']['obj']:SCWidth(w) |
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['HEALTH']['obj'].border) |
_G['SC'].BARS['THEALTH']['obj']:SCWidth(w) |
SliceCommander:SetSizeBorder(w, 0, _G['SC'].BARS['THEALTH']['obj'].border) |
local cx = 0 |
for i = 1, maxCP do |
_G['SC'].BARS['CP']['obj'].combos[i]:SCPoint("TOPLEFT", _G['SC'].BARS['CP']['obj'], "TOPLEFT", cx, 0) |
_G['SC'].BARS['CP']['obj'].combos[i]:SCPoint("BOTTOMRIGHT", _G['SC'].BARS['CP']['obj'], "BOTTOMLEFT", cx + widthCP , 0) |
_G['SC'].BARS['CP']['obj'].combos[i]:SCWidth(widthCP) |
SliceCommander:SetSizeBorder(widthCP, 0, _G['SC'].BARS['CP']['obj'].combos[i].border) |
cx = cx + widthCP + pxMargin |
end |
SliceCommander:SetSparks() |
end |
function SliceCommander:SetSizeBorder(w, h, border) |
local k = 6 |
for i,v in pairs(border) do |
if h ~= 0 then |
v:SCHeight(h+k) |
end |
if w ~= 0 then |
v:SCWidth(w+k) |
end |
k = k-2 |
end |
end |
function SliceCommander:SetEnergyHeight(h) |
VTimerEnergy:SCHeight(h) |
SliceCommanderFrame:SCHeight(h+16) |
_G['SC'].Spark[1]:SCHeight(h) |
_G['SC'].Spark[2]:SCHeight(h) |
_G['SC'].Spark[3]:SCHeight(h) |
SliceCommander:SetSizeBorder(0, h, VTimerEnergy.border) |
SliceCommander:HealthBar('HEALTH') |
SliceCommander:HealthBar('THEALTH') |
end |
function SliceCommander:SetIconSize(w) |
SliceCommander:SetIconSizeObj(_G['SC'].OTHER['POISON']['obj'], w) |
SliceCommander:SetIconSizeObj(_G['SC'].ICONS['AUD']['obj'], w) |
end |
function SliceCommander:SetIconSizeObj(obj, w) |
obj:SCSize(w, w) |
obj.overlay:SCSize(w, w) |
obj.overlay:SCSize(w-3, w-3) |
obj.iconTxt:SCSize(w, w-5) |
obj.icon:SCSize(w, w) |
obj.moveframe:SCSize(w+16, w+16) |
SliceCommander:SetSizeBorder(w, w, obj.border) |
end |
function SliceCommander:SetTimersHeight(h) |
v['obj'].text:SCHeight(h) |
v['obj'].text2:SCHeight(h) |
SliceCommander:SetSizeBorder(0, h, v['obj'].border) |
if i ~= 'THREAT' and i ~= 'HEALTH' and i ~= 'THEALTH' then |
v['obj'].icon:SCSize(h, h) |
SliceCommander:SetSizeBorder(h, h, v['obj'].iconBorder) |
end |
end |
end |
local maxCP = UnitPowerMax("player", Enum.PowerType.ComboPoints) |
for i = 1, maxCP do |
_G['SC'].BARS['CP']['obj'].combos[i]:SCHeight(h) |
SliceCommander:SetSizeBorder(0, h, _G['SC'].BARS['CP']['obj'].combos[i].border) |
end |
_G['SC'].BarFont1:SetFont(SliceCommander:GetFont(), (h-2)*_G['SC'].V.pxH, "") |
SliceCommander:OrderSpells({'GB', 'SOD', 'SD', 'SB', 'SHT', 'FW'}) |
SliceCommander:OrderCDs({'GBCD', 'SDCD', 'SBCD', 'SODCD', 'SHTCD', 'STHCD'}) |
end |
function SliceCommander:SetEssence() |
} |
} |
end |
SliceCommander:InitIconsArray() |
end |
function SliceCommander:InitIconsArray() |
if _G['SC'].ICONS == nil then |
_G['SC'].ICONS = {} |
end |
if _G['SC'].ICONS['AUD'] == nil then |
_G['SC'].ICONS['AUD'] = { |
['obj'] = 0, |
['expire'] = 0, |
['color'] = 0, |
['position'] = { |
['xOfs'] = -50, |
['yOfs'] = 150, |
['relativePoint'] = "CENTER", |
['point'] = "CENTER", |
['relativeTo'] = "UIParent" |
} |
} |
end |
end |
function SliceCommander:InitGlobalBarArray() |
if _G['SC'].BARS['HEALTH'] == nil then |
_G['SC'].BARS['HEALTH'] = {['color'] = {0, 0, 0}} |
--MULTIPLE BUFF BAR |
_G['SC'].BARS['RB']['type'] = 6 |
--ICONS |
_G['SC'].ICONS['AUD']['type'] = 1 |
_G['SC'].ICONS['AUD']['id'] = SC_SPELLID['AUD'] |
--SPECIAL Echoing reprimand |
_G['SC'].BARS['ER']['id'] = {SC_SPELLID['ER2'], SC_SPELLID['ER3'], SC_SPELLID['ER4'], SC_SPELLID['ER5']} |
--[[local chargecd = {'SDCD'} |
for i, v in ipairs(chargecd) do |
_G['SC'].BARS[v]['type'] = 5 |
f.text2:SetJustifyH("CENTER") |
f:SetStatusBarColor(unpack(color)) |
f.border = SliceCommander:tukSkin(f, false) |
f.iconBorder = SliceCommander:tukSkin(f, f.icon) |
local animPlaying = false |
combo.bg = combo:CreateTexture(nil, "BACKGROUND", nil, 1) |
combo.bg:SetAllPoints(combo) |
combo.bg:SetTexture("Interface\\AddOns\\SliceCommander\\Images\\solid.tga") |
combo.border = SliceCommander:tukSkin(combo, false) |
combo.bg:Hide() |
local animPlaying = false |
f:Hide() |
f:SetDefaultBackdrop() |
local r,v,b = unpack(_G['SC'].V.bColor) |
f:SetBackdropBorderColor(unpack(_G['SC'].V.wColor)) |
f:SetBackdropColor(r,v,b,0) |
f:SetPoint(point, VTimerEnergy, relativePoint, x, y) |
return f |
function SliceCommander:CreateMoveFrame() |
CreateFrame('Frame', 'SliceCommanderFrame', UIParent, BackdropTemplateMixin and "BackdropTemplate") |
SliceCommanderFrame.type = 'OTHER' |
SliceCommanderFrame:SetToplevel(true) |
SliceCommanderFrame:EnableMouse(false) |
SliceCommanderFrame:SetMovable(true) |
f:SetFrameLevel(1) |
f:SetMinMaxValues(0,UnitPowerMax("player", Enum.PowerType.Energy)) |
f:SetDefaultBackdrop() |
f:SetBackdropBorderColor(unpack(_G['SC'].V.wColor)) |
f:SetBackdropColor(unpack({.1,.1,.1,.7})) |
f:SetStatusBarTexture(SliceCommander:BarTexture()) |
f:SetFrameStrata("MEDIUM") |
f:SetFrameLevel(1) |
f:SetStatusBarColor(unpack(_G['SC'].SET.energyColor)) |
f.border = SliceCommander:tukSkin(f, false) |
if _G['SC'].SET.HideEnergy then |
f:Hide() |
else |
return tickObj |
end |
function SliceCommander:NewMoveFrameIcon(name) |
function SliceCommander:NewMoveFrameIcon(name, icontype) |
local MoveFrame = CreateFrame('Button', name, UIParent, BackdropTemplateMixin and "BackdropTemplate") |
MoveFrame:SetToplevel(true) |
MoveFrame:EnableMouse(false) |
MoveFrame:SetMovable(true) |
MoveFrame:SCSize(28, 28) |
local obj = _G['SC'].OTHER |
if icontype == 'OTHER' then |
obj = _G['SC'].OTHER |
elseif icontype == 'ICONS' then |
obj = _G['SC'].ICONS |
end |
MoveFrame:SetPoint( |
_G['SC'].OTHER[name]['position'].point, |
_G['SC'].OTHER[name]['position'].relativeTo, |
_G['SC'].OTHER[name]['position'].relativePoint, |
_G['SC'].OTHER[name]['position'].xOfs, |
_G['SC'].OTHER[name]['position'].yOfs |
obj[name]['position'].point, |
obj[name]['position'].relativeTo, |
obj[name]['position'].relativePoint, |
obj[name]['position'].xOfs, |
obj[name]['position'].yOfs |
) |
MoveFrame:SetDefaultBackdrop() |
MoveFrame:SetBackdropColor(0.7,0.2,0.2,1) |
return MoveFrame |
end |
function SliceCommander:NewIcon(icon, name) |
local MoveFrame = SliceCommander:NewMoveFrameIcon(name) |
function SliceCommander:NewIcon(icon, name, icontype) |
local MoveFrame = SliceCommander:NewMoveFrameIcon(name, icontype) |
local f = CreateFrame("Frame", name..'button', UIParent, BackdropTemplateMixin and "BackdropTemplate") |
f:SCPoint('CENTER', name, 'CENTER', 0, 0) |
f:SetFrameStrata("MEDIUM") |
f:SetFrameLevel(1) |
f.moveframe = MoveFrame |
f.type = icontype |
local fIcon = f:CreateTexture(nil, "OVERLAY", nil, 1) |
fIcon:SCPoint("CENTER", f, "CENTER", 0, 0) |
fIcon:SetTexCoord(.08, .92, .08, .92) |
fIcon:SetTexture(icon) |
f.icon = fIcon |
f.border = SliceCommander:tukSkin(f, fIcon) |
f.overlay = CreateFrame('Frame', nil, f, BackdropTemplateMixin and "BackdropTemplate") |
f.overlay:SetFrameStrata("HIGH") |
f.iconTxt = f.overlay:CreateFontString(nil, 'OVERLAY', 'GameFontNormal') |
f.iconTxt:SetJustifyH("CENTER") |
f.iconTxt:SetJustifyV("MIDDLE") |
f.iconTxt:SCPoint('CENTER', f, "CENTER", 2, 0) |
f.iconTxt:SCPoint('CENTER', f, "CENTER", 0, 0) |
f.iconTxt:SetFontObject(_G['SC'].FontIcon) |
f.iconTxt:SetShadowColor(0,0,0,1) |
f.iconTxt:SetShadowOffset(2*_G['SC'].V.pxW, -2*_G['SC'].V.pxH) |
f.text = f.iconTxt--ALIAS |
--Animation (Blink) |
f.animFade = f:CreateAnimationGroup() |
f.animFade:SetLooping('BOUNCE') |
f.anim = { |
Play = function() |
animPlaying = true |
Glower.PixelGlow_Start(f, {1, 0.15, 0.15, 1}, 8, .25, false, 2) |
f.animFade:Play() |
end, |
Stop = function() |
animPlaying = false |
Glower.PixelGlow_Stop(f) |
f.animFade:Stop() |
end, |
IsPlaying = function() |
return animPlaying |
end |
} |
return f |
end |