Commit c59ed707 authored by Azilroka's avatar Azilroka

Restructure

parent 56f15b73
package-as: AddOnSkins_ElvUI
move-folders:
AddOnSkins_ElvUI/AddOnSkins_ElvUI: AddOnSkins_ElvUI
AddOnSkins_ElvUI/AddOnSkins_Skins: AddOnSkins_Skins
ignore:
- AddOnSkins_Tukui
- AddOnSkins_AsphyxiaUI
- AddOnSkins_DuffedUI
- AddOnSkins_Systems
- AddOnSkins_Skins/Tukui
\ No newline at end of file
package-as: AddOnSkins
## Interface: 50400
## Title: |cff1784d1ElvUI |r|cffFFFFFFAddOnSkins|r
## Version: 2.20
## Title: |cff1784d1AddOnSkins|r
## Version: 3.00
## Author: Azilroka, Sortokk
## RequiredDep: ElvUI
## SavedVariables: AddOnSkins_Options
## OptionalDep: DSM
## X-Tukui-ProjectID: 128
## X-Tukui-ProjectFolders: AddOnSkins_ElvUI, AddOnSkins_Skins
## X-Tukui-ProjectFolders: AddOnSkins
Load_AddOnSkins.xml
\ No newline at end of file
## Interface: 50400
## Title: |cFFFF6347AsphyxiaUI|r |cFFFFFFFFAddOnSkins|r
## Version: 2.20
## Author: Azilroka, Sortokk
## RequiredDeps: AsphyxiaUI, Enhanced_Config
## SavedVariables: AddOnSkins_Options
## X-Tukui-ProjectID: 222
## X-Tukui-ProjectFolders: AddOnSkins_AsphyxiaUI
Load_AddOnSkins.xml
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="WorldStateCaptureBar.lua"/>
</Ui>
\ No newline at end of file
local AS = unpack(select(2, ...))
local AddOnName = ...
local name = 'Blizzard_WorldStateCaptureBar'
function AS:Blizzard_WorldStateCaptureBar(event, addon)
local Horde = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\Gloss-Horde"
local Alliance = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\Gloss-Alliance"
local FFA = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\FFA"
local BarTexture = AS.NormTex
local CreateCaptureBar = function(ID)
if not _G['WorldStateCaptureBar'..ID] then return end
_G['WorldStateCaptureBar'..ID]:StripTextures(true)
_G['WorldStateCaptureBar'..ID..'Indicator']:StripTextures(true)
_G['WorldStateCaptureBar'..ID..'LeftBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'MiddleBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'IndicatorLeft']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'IndicatorRight']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'LeftLine']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightLine']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'LeftIconHighlight']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightIconHighlight']:SetTexture(nil)
if _G['CaptureBar'..ID] then return end
local Bar = CreateFrame('StatusBar', 'CaptureBar'..ID, _G['WorldStateCaptureBar'..ID])
Bar:SetFrameLevel(0)
Bar:SetPoint('CENTER', UIParent, 'CENTER', 0, 360)
Bar:CreateBackdrop()
Bar:SetSize(160, 16)
Bar:SetStatusBarTexture(BarTexture)
Bar:SetStatusBarColor(1, 1, 1)
Bar:SetMinMaxValues(0, 100)
Bar:SetValue(100)
Bar.AllianceBar = CreateFrame('StatusBar', nil, Bar)
Bar.AllianceBar:SetFrameLevel(1)
Bar.AllianceBar:SetPoint('LEFT', Bar, 'LEFT', 0, 0)
Bar.AllianceBar:SetSize(160, 16)
Bar.AllianceBar:SetStatusBarTexture(BarTexture)
Bar.AllianceBar:SetStatusBarColor(0, .44, .87)
Bar.AllianceBar:SetMinMaxValues(0, 100)
Bar.AllianceIcon = Bar:CreateTexture(nil, 'ARTWORK')
Bar.AllianceIcon:SetTexture(Alliance)
Bar.AllianceIcon:SetPoint('RIGHT', Bar, 'LEFT', 0, 0)
Bar.AllianceIcon:SetSize(32, 32)
Bar.HordeBar = CreateFrame('StatusBar', nil, Bar)
Bar.HordeBar:SetFrameLevel(1)
Bar.HordeBar:SetPoint('LEFT', Bar, 'LEFT', 0, 0)
Bar.HordeBar:SetSize(160, 16)
Bar.HordeBar:SetStatusBarTexture(BarTexture)
Bar.HordeBar:SetStatusBarColor(.77, .12, .23)
Bar.HordeBar:SetMinMaxValues(0, 100)
Bar.HordeBar:SetReverseFill(true)
Bar.HordeIcon = Bar:CreateTexture(nil, 'ARTWORK')
Bar.HordeIcon:SetTexture(Horde)
Bar.HordeIcon:SetPoint('LEFT', Bar, 'RIGHT', 0, 0)
Bar.HordeIcon:SetSize(32, 32)
Bar.SparkBar = CreateFrame('StatusBar', nil, Bar)
Bar.SparkBar:SetFrameLevel(3)
Bar.SparkBar:SetPoint('LEFT', Bar, 'LEFT', 0, 0)
Bar.SparkBar:SetSize(160, 16)
Bar.SparkBar:SetStatusBarTexture(0, 0, 0, 0)
Bar.SparkBar:SetMinMaxValues(0, 100)
Bar.SparkBar:SetReverseFill(true)
Bar.SparkBar.Spark = CreateFrame('Frame', nil, Bar.SparkBar)
Bar.SparkBar.Spark:SetFrameLevel(3)
Bar.SparkBar.Spark:SetTemplate()
Bar.SparkBar.Spark:SetSize(4, 18)
Bar.SparkBar.Spark:Point('CENTER', Bar.SparkBar:GetStatusBarTexture(), 'LEFT', 0, 0)
Bar.SparkBar.Spark.Texture = Bar.SparkBar.Spark:CreateTexture(nil, 'ARTWORK')
Bar.SparkBar.Spark.Texture:SetPoint('CENTER', Bar.SparkBar.Spark, 'CENTER', 0, 0)
Bar.SparkBar.Spark.Texture:SetSize(32, 32)
end
local style = 1
local UpdateCaptureBar = function(ID, Current, Neutral)
local Bar = _G['CaptureBar'..ID]
if not Bar then CreateCaptureBar(ID) end
local FactionZone = (100 - Neutral) / 2
if style == 1 then
Bar.AllianceBar:SetValue(FactionZone)
Bar.HordeBar:SetValue(FactionZone)
Bar.SparkBar:SetValue(Current)
Bar.SparkBar:Show()
end
if style == 2 then
Neutral = Neutral / 2
Bar.AllianceBar:SetValue(Current - Neutral)
Bar.HordeBar:SetValue(100 - Current - Neutral)
if Current > 90 then Bar.AllianceBar:SetValue(Current) end
if Current < 10 then Bar.HordeBar:SetValue(100 - Current) end
Bar.SparkBar:Hide()
end
if style == 3 then
Bar.AllianceBar:SetValue(Current)
Bar.HordeBar:SetValue(100 - Current)
Bar.SparkBar:Hide()
end
if style == 4 then
Bar.AllianceBar:SetValue(FactionZone)
Bar.HordeBar:SetValue(FactionZone)
Bar.SparkBar:SetValue(Current)
Bar.SparkBar:Show()
Bar.SparkBar.Spark:StripTextures()
Bar.SparkBar.Spark.Texture:Show()
Bar.SparkBar.Spark.Texture:SetTexture(FFA)
if Current <= FactionZone then Bar.SparkBar.Spark.Texture:SetTexture(Horde) end
if Current >= (FactionZone + Neutral) then Bar.SparkBar.Spark.Texture:SetTexture(Alliance) end
Bar.HordeIcon:Hide()
Bar.AllianceIcon:Hide()
end
end
hooksecurefunc(ExtendedUI['CAPTUREPOINT'], 'create', CreateCaptureBar)
hooksecurefunc(ExtendedUI['CAPTUREPOINT'], 'update', UpdateCaptureBar)
end
AS:RegisterSkin(name, AS.Blizzard_WorldStateCaptureBar)
\ No newline at end of file
local AS = unpack(select(2,...))
local function FontString(parent, name, fontName, fontHeight, fontStyle)
local fs = parent:CreateFontString(nil, "OVERLAY")
fs:SetFont(fontName, fontHeight, fontStyle)
fs:SetJustifyH("LEFT")
fs:SetShadowColor(0, 0, 0)
fs:SetShadowOffset(AS.Mult, -AS.Mult)
if not name then
parent.Text = fs
else
parent[name] = fs
end
return fs
end
local function addapi(object)
local mt = getmetatable(object).__index
if not object.FontString then mt.FontString = FontString end
end
local handled = {["Frame"] = true}
local object = CreateFrame("Frame")
addapi(object)
addapi(object:CreateTexture())
addapi(object:CreateFontString())
object = EnumerateFrames()
while object do
if not handled[object:GetObjectType()] then
addapi(object)
handled[object:GetObjectType()] = true
end
object = EnumerateFrames(object)
end
local AS = unpack(select(2, ...))
local type, strlower, unpack = type, strlower, unpack
function AS:SkinButton(frame, strip)
frame:SkinButton(strip)
end
function AS:SkinScrollBar(frame)
frame:SkinScrollBar()
_G[frame:GetName().."ScrollUpButton"]:StripTextures()
_G[frame:GetName().."ScrollUpButton"]:SetTemplate("Default", true)
_G[frame:GetName().."ScrollDownButton"]:StripTextures()
_G[frame:GetName().."ScrollDownButton"]:SetTemplate("Default", true)
if not _G[frame:GetName().."ScrollUpButton"].text then
_G[frame:GetName().."ScrollUpButton"]:FontString("text", AS.ActionBarFont, 12)
_G[frame:GetName().."ScrollUpButton"].text:SetText("▲")
_G[frame:GetName().."ScrollUpButton"].text:SetPoint("CENTER", 0, 0)
_G[frame:GetName().."ScrollUpButton"].text:SetTextColor(unpack(AS.BorderColor))
end
if not _G[frame:GetName().."ScrollDownButton"].text then
_G[frame:GetName().."ScrollDownButton"]:FontString("text", AS.ActionBarFont, 12)
_G[frame:GetName().."ScrollDownButton"].text:SetText("▼")
_G[frame:GetName().."ScrollDownButton"].text:SetPoint("CENTER", 0, 0)
_G[frame:GetName().."ScrollDownButton"].text:SetTextColor(unpack(AS.BorderColor))
end
end
function AS:SkinTab(frame, strip)
if strip then frame:StripTextures(true) end
frame:SkinTab()
end
function AS:SkinNextPrevButton(frame, horizonal)
frame:SkinNextPrevButton(horizonal)
end
function AS:SkinRotateButton(frame)
frame:SkinRotateButton()
end
function AS:SkinEditBox(frame, width, height)
frame:SkinEditBox()
if width then frame:Width(width) end
if height then frame:Height(height) end
end
function AS:SkinDropDownBox(frame, width)
frame:SkinDropDownBox(width)
end
function AS:SkinCheckBox(frame)
frame:SkinCheckBox()
end
function AS:SkinCloseButton(frame, point)
frame:SkinCloseButton(point)
end
function AS:SkinSlideBar(frame, height, movetext)
frame:SkinSlideBar(height, movetext)
end
function AS:SkinFrame(frame, template, override, kill)
if not template then template = 'Transparent' end
if not override then frame:StripTextures(kill) end
frame:SetTemplate(template)
end
function AS:SkinBackdropFrame(frame, template, override, kill, setpoints)
if not template then template = 'Transparent' end
if not override then frame:StripTextures(kill) end
frame:CreateBackdrop(template)
if setpoints then frame.backdrop:SetAllPoints() end
end
function AS:SkinTitleBar(frame, template, override, kill)
if not template then template = 'Transparent' end
if not override then frame:StripTextures(kill) end
frame:SetTemplate(template, true)
end
function AS:SkinStatusBar(frame, ClassColor)
AS:SkinBackdropFrame(frame)
frame:SetStatusBarTexture(AS.NormTex)
if ClassColor then
local color = RAID_CLASS_COLORS[AS.MyClass]
frame:SetStatusBarColor(color.r, color.g, color.b)
end
end
function AS:SkinTooltip(tooltip, scale)
tooltip:HookScript('OnShow', function(frame)
frame:SetTemplate('Transparent')
if scale then frame:SetScale(AS.UIScale) end
end)
end
function AS:SkinIconButton(frame, shrinkIcon)
frame:SkinIconButton(shrinkIcon)
local icon = frame.icon
if frame:GetName() and _G[frame:GetName()..'IconTexture'] then
icon = _G[frame:GetName()..'IconTexture']
elseif frame:GetName() and _G[frame:GetName()..'Icon'] then
icon = _G[frame:GetName()..'Icon']
end
if icon then
AS:SkinTexture(icon)
end
end
function AS:Desaturate(frame, point)
for i = 1, frame:GetNumRegions() do
local region = select(i, frame:GetRegions())
if region:IsObjectType('Texture') then
local Texture = region:GetTexture()
if type(Texture) == 'string' and strlower(Texture) == 'interface\\dialogframe\\ui-dialogbox-corner' then
region:SetTexture(nil)
region:Kill()
else
region:SetDesaturated(true)
end
end
end
frame:HookScript('OnUpdate', function(self)
if self:GetNormalTexture() then
self:GetNormalTexture():SetDesaturated(true)
end
if self:GetPushedTexture() then
self:GetPushedTexture():SetDesaturated(true)
end
if self:GetHighlightTexture() then
self:GetHighlightTexture():SetDesaturated(true)
end
end)
end
local AS = unpack(select(2, ...))
function AS:CreateToggleButton(Name, Text, Panel1, Panel2, TooltipText1, TooltipText2)
local Frame = CreateFrame('Button', Name, UIParent)
Frame:SetFrameStrata("DIALOG")
Frame:SetTemplate('Transparent')
Frame:Size(17, Panel1:GetHeight() - 4)
Frame:FontString('Text', AS.ActionBarFont, 12)
Frame.Text:SetText(Text)
Frame.Text:SetPoint('CENTER', 0, 1)
Frame:RegisterForClicks('LeftButtonDown', 'RightButtonDown')
UIFrameFadeOut(Frame, 0.2, Frame:GetAlpha(), 0)
Frame:SetScript('OnEnter', function(self, ...)
UIFrameFadeIn(self, 0.2, self:GetAlpha(), 1)
if self.Faded then
UIFrameFadeIn(Panel1, 0.2, Panel1:GetAlpha(), 1)
UIFrameFadeIn(Panel2, 0.2, Panel2:GetAlpha(), 1)
if Name == 'LeftToggleButton' then UIFrameFadeIn(GeneralDockManager, 0.2, GeneralDockManager:GetAlpha(), 1) end
end
GameTooltip:SetOwner(self, Name == 'LeftToggleButton' and 'ANCHOR_TOPLEFT' or 'ANCHOR_TOPRIGHT', 0, 4)
GameTooltip:ClearLines()
if IsAddOnLoaded('Tukui_ChatTweaks') and ChatTweaksOptions['ChatHider'] then
if AS.ChatBackgroundRight then
GameTooltip:AddDoubleLine('Left Click:', TooltipText1, 1, 1, 1)
end
end
GameTooltip:AddDoubleLine('Right Click:', TooltipText2, 1, 1, 1)
GameTooltip:Show()
end)
Frame:SetScript('OnLeave', function(self, ...)
UIFrameFadeOut(self, 0.2, self:GetAlpha(), 0)
if self.Faded then
UIFrameFadeOut(Panel1, 0.2, Panel1:GetAlpha(), 0)
UIFrameFadeOut(Panel2, 0.2, Panel2:GetAlpha(), 0)
if Name == 'LeftToggleButton' then UIFrameFadeOut(GeneralDockManager, 0.2, GeneralDockManager:GetAlpha(), 0) end
end
GameTooltip:Hide()
end)
end
function AS:EmbedSystem_WindowResize()
if not AS.ChatBackgroundRight then
EmbedSystem_MainWindow:SetPoint('BOTTOM', AS.InfoRight, 'TOP', 0, 2)
EmbedSystem_MainWindow:SetSize(AS.InfoRight:GetWidth(), 142)
else
EmbedSystem_MainWindow:SetPoint('BOTTOM', AS.InfoRight, 'TOP', 0, 3)
EmbedSystem_MainWindow:SetSize(AS.InfoRight:GetWidth(), AS.ChatBackgroundRight:GetHeight() - (AS:CheckOption('EmbedBelowTop') and 60 or 36))
end
EmbedSystem_LeftWindow:SetPoint('RIGHT', EmbedSystem_RightWindow, 'LEFT', -2, 0)
EmbedSystem_RightWindow:SetPoint('RIGHT', EmbedSystem_MainWindow, 'RIGHT', 0, 0)
EmbedSystem_LeftWindow:SetSize(AS:CheckOption('EmbedLeftWidth') - 1, EmbedSystem_MainWindow:GetHeight())
EmbedSystem_RightWindow:SetSize((EmbedSystem_MainWindow:GetWidth() - AS:CheckOption('EmbedLeftWidth')) - 1, EmbedSystem_MainWindow:GetHeight())
if Enhanced_Config[1].Options.args.skins then
Enhanced_Config[1].Options.args.skins.args.embed.args.EmbedLeftWidth.min = floor(EmbedSystem_MainWindow:GetWidth() * .25)
Enhanced_Config[1].Options.args.skins.args.embed.args.EmbedLeftWidth.max = floor(EmbedSystem_MainWindow:GetWidth() * .75)
end
end
local A, C, L, G = unpack(AsphyxiaUI)
local AddOnName, Engine = ...
local AddOn = LibStub('AceAddon-3.0'):NewAddon('AddOnSkins', 'AceConsole-3.0', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0')
Engine[1] = AddOn
AddOnSkins = Engine
AddOn.Locale = L
AddOn.Title = select(2, GetAddOnInfo(AddOnName))
AddOn.Version = GetAddOnMetadata(AddOnName, 'Version')
local Frame = CreateFrame('Frame')
Frame:Hide()
Frame:SetTemplate()
AddOn.DownloadLink = 'http://www.tukui.org/addons/index.php?act=view&id=222'
AddOn.LSM = LibStub('LibSharedMedia-3.0')
AddOn.Blank = AddOn.LSM:Fetch('background', 'Solid')
AddOn.NormTex = AddOn.LSM:Fetch('statusbar', 'Asphyxia')
AddOn.Font = AddOn.LSM:Fetch('font', 'PT Sans Narrow Bold')
AddOn.PixelFont = AddOn.LSM:Fetch('font', 'Homespun TT BRK')
AddOn.ActionBarFont = AddOn.LSM:Fetch('font', 'Arial')
AddOn.UIScale = UIParent:GetScale()
AddOn.Mult = 768/strmatch(GetCVar('gxResolution'), '%d+x(%d+)')/AddOn.UIScale
AddOn.BackdropColor = { Frame:GetBackdropColor() }
AddOn.BorderColor = { Frame:GetBackdropBorderColor() }
AddOn.DataTextFontSize = 12
AddOn.InfoLeft = ChatFramesLeftDataTextBackground
AddOn.InfoRight = ChatFramesRightDataTextBackground
AddOn.ChatBackgroundRight = ChatFramesRightBackground
AddOn.ChatBackgroundLeft = ChatFramesLeftBackground
AddOn.TabsRightBackground = ChatFramesRightTabBackground
AddOn.TabsLeftBackground = ChatFramesLeftTabBackground
AddOn.Minimap = Mover_Minimap
AddOn.ActionBar1 = ActionBarsActionBars1
AddOn.ActionBar2 = ActionBarsActionBars2
AddOn.ActionBar3 = ActionBarsActionBars3
AddOn.ActionBar4 = ActionBarsActionBars4
function AddOn:Delay(delay, func, ...)
A.Delay(delay, func, ...)
end
\ No newline at end of file
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="API.lua"/>
<Script file="Core.lua"/>
<Script file="..\..\AddOnSkins_Systems\Backend.lua"/>
<Script file="EmbedWindow.lua"/>
<Script file="..\..\AddOnSkins_Systems\Conflicts.lua"/>
<Script file="..\..\AddOnSkins_Systems\Options.lua"/>
<Script file="..\..\AddOnSkins_Systems\Embed.lua"/>
</Ui>
AddOnSkins_AsphyxiaUI License
Copyright 2014 http://www.tukui.org
The contents of this addon, excluding third-party resources, are
copyrighted to their authors with all rights reserved.
Authors of this addon hereby grant you the following rights:
1. You may NOT make any modification inside this addon. If you want
to create your own edited version, please create it from outside.
2. Do not modify the name of this addon, including the addon folders.
3. This copyright notice shall be included in all copies or substantial
portions of the Software.
All rights not explicitly addressed in this license are reserved by
the copyright holders.
You can write us at Tukui.org for reporting abuse.
You can private message Azilroka or Sortokk for any bugs.
local AS = unpack(select(2,...))
local L = AS.Locale
L.DataText.Toggle = 'Toggle'
L.DataText.Embed = 'Embed'
L.Skins.ToggleSkinDesc = 'Enable/Disable this skin.'
L.Skins.ToggleEmbedDesc = 'Enable/Disable this embed.'
L.Skins.ToggleOptionDesc = 'Enable/Disable this option.'
L.Skins.MiscellaneousOptions = 'Miscellaneous Options'
L.Skins.ToggleLeftChat = 'Toggle Left Chat Panel'
L.Skins.ToggleRightChat = 'Toggle Right Chat Panel'
L.Skins.ToggleEmbed = 'Toggle Embedded AddOn'
L.Skins.ToggleOptions = 'Toggle Extra Skins/Options'
\ No newline at end of file
local AS = unpack(select(2, ...))
local L = AS.Locale
if not L.Skins then L.Skins = {} end
if not L.DataText then L.DataText = {} end
## Interface: 50400
## Title: |cffC41F3BDuffedUI|r |cFFFFFFFFAddOnSkins|r
## Version: 2.20
## Author: Azilroka, Sortokk
## RequiredDeps: DuffedUI, Enhanced_Config
## SavedVariables: AddOnSkins_Options
## X-Tukui-ProjectID: 221
## X-Tukui-ProjectFolders: AddOnSkins_DuffedUI
Load_AddOnSkins.xml
\ No newline at end of file
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="WorldStateCaptureBar.lua"/>
</Ui>
\ No newline at end of file
local AS = unpack(select(2, ...))
local AddOnName = ...
local name = 'Blizzard_WorldStateCaptureBar'
function AS:Blizzard_WorldStateCaptureBar(event, addon)
local Horde = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\Gloss-Horde"
local Alliance = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\Gloss-Alliance"
local FFA = "Interface\\AddOns\\"..AddOnName.."\\Media\\Icons\\FFA"
local BarTexture = AS.NormTex
local CreateCaptureBar = function(ID)
if not _G['WorldStateCaptureBar'..ID] then return end
_G['WorldStateCaptureBar'..ID]:StripTextures(true)
_G['WorldStateCaptureBar'..ID..'Indicator']:StripTextures(true)
_G['WorldStateCaptureBar'..ID..'LeftBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'MiddleBar']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'IndicatorLeft']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'IndicatorRight']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'LeftLine']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightLine']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'LeftIconHighlight']:SetTexture(nil)
_G['WorldStateCaptureBar'..ID..'RightIconHighlight']:SetTexture(nil)
if _G['CaptureBar'..ID] then return end
local Bar = CreateFrame('StatusBar', 'CaptureBar'..ID, _G['WorldStateCaptureBar'..ID])
Bar:SetFrameLevel(0)
Bar:SetPoint('CENTER', UIParent, 'CENTER', 0, 360)
Bar:CreateBackdrop()
Bar:SetSize(160, 16)
Bar:SetStatusBarTexture(BarTexture)
Bar:SetStatusBarColor(1, 1, 1)
Bar:SetMinMaxValues(0, 100)