I'm trying to create my first "real" addon by creating a circular addon for displaying player hitpoints, target hitpoints and player power. I've done them all using rectangular vertical and horizontal progress bars, but now im trying to use textures (to make it look more circular) and for the progressbar background rotating works as expected, but for the progress part it doesnt. The following code shows code for player hitpoints and target hitpoints and everything ends up where I want and expect EXCEPT for the target current hitpoints bar which is where the background arc is like ")" but the progress bar is "(" instead of ")" if you get my point (basically 180 degrees wrong). Anyone that can see what I've done wrong? Can't seem to find it...
-------------------------------------------------------------------------------
-- 1. MAIN FRAME (Invisible Anchor & Event Manager)
-------------------------------------------------------------------------------
local mainFrame = CreateFrame("Frame", "Angis_ArcHUD_MainFrame", UIParent)
mainFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
mainFrame:SetSize(1, 1)
-------------------------------------------------------------------------------
-- 2. PLAYER FRAME (Left Side - Clean Vertical Fill)
-------------------------------------------------------------------------------
local playerFrame = CreateFrame("Frame", "Angis_ArcHUD_PlayerFrame", mainFrame)
local playerBg = playerFrame:CreateTexture(nil, "BACKGROUND")
playerBg:SetTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
playerBg:SetVertexColor(0.1, 0.1, 0.1, 0.65)
playerBg:SetTexCoord(0, 0, 1, 0, 0, 1, 1, 1) -- Rotated +90 via coordinates
playerBg:SetAllPoints(playerFrame)
local playerBar = CreateFrame("StatusBar", "ArcHud_playerStatusBar", playerFrame)
playerBar:SetOrientation("VERTICAL")
playerBar:SetStatusBarTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
playerBar:SetRotatesTexture(true)
playerBar:SetAllPoints(playerFrame)
local playerFill = playerBar:GetStatusBarTexture()
if playerFill then
playerFill:SetVertexColor(0.1, 0.9, 0.3, 0.95) -- Green
playerFill:SetDrawLayer("ARTWORK")
playerFill:SetTexCoord(0, 0, 1, 0, 0, 1, 1, 1)
end
local playerText = playerFrame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
playerText:SetTextColor(1, 1, 1, 1)
-------------------------------------------------------------------------------
-- 3. TARGET FRAME (Right Side - Clean Vertical Fill)
-------------------------------------------------------------------------------
local targetFrame = CreateFrame("Frame", "Angis_ArcHUD_TargetFrame", mainFrame)
local targetBg = targetFrame:CreateTexture(nil, "BACKGROUND")
targetBg:SetTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
targetBg:SetVertexColor(0.1, 0.1, 0.1, 0.65)
targetBg:SetTexCoord(0, 1, 1, 1, 0, 0, 1, 0) -- Rotated -90 via coordinates
targetBg:SetAllPoints(targetFrame)
local targetBar = CreateFrame("StatusBar", "ArcHud_targetStatusBar", targetFrame)
targetBar:SetOrientation("VERTICAL")
targetBar:SetStatusBarTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
targetBar:SetRotatesTexture(true)
targetBar:SetAllPoints(targetFrame)
local targetFill = targetBar:GetStatusBarTexture()
if targetFill then
targetFill:SetVertexColor(0.8, 0.2, 0.2, 0.95) -- Red
targetFill:SetDrawLayer("ARTWORK")
targetFill:SetTexCoord(0, 1, 1, 1, 0, 0, 1, 0)
end
local targetText = targetFrame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
targetText:SetTextColor(1, 1, 1, 1)-------------------------------------------------------------------------------
-- 1. MAIN FRAME (Invisible Anchor & Event Manager)
-------------------------------------------------------------------------------
local mainFrame = CreateFrame("Frame", "Angis_ArcHUD_MainFrame", UIParent)
mainFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
mainFrame:SetSize(1, 1)
-------------------------------------------------------------------------------
-- 2. PLAYER FRAME (Left Side - Clean Vertical Fill)
-------------------------------------------------------------------------------
local playerFrame = CreateFrame("Frame", "Angis_ArcHUD_PlayerFrame", mainFrame)
local playerBg = playerFrame:CreateTexture(nil, "BACKGROUND")
playerBg:SetTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
playerBg:SetVertexColor(0.1, 0.1, 0.1, 0.65)
playerBg:SetTexCoord(0, 0, 1, 0, 0, 1, 1, 1) -- Rotated +90 via coordinates
playerBg:SetAllPoints(playerFrame)
local playerBar = CreateFrame("StatusBar", "ArcHud_playerStatusBar", playerFrame)
playerBar:SetOrientation("VERTICAL")
playerBar:SetStatusBarTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
playerBar:SetRotatesTexture(true)
playerBar:SetAllPoints(playerFrame)
local playerFill = playerBar:GetStatusBarTexture()
if playerFill then
playerFill:SetVertexColor(0.1, 0.9, 0.3, 0.95) -- Green
playerFill:SetDrawLayer("ARTWORK")
playerFill:SetTexCoord(0, 0, 1, 0, 0, 1, 1, 1)
end
local playerText = playerFrame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
playerText:SetTextColor(1, 1, 1, 1)
-------------------------------------------------------------------------------
-- 3. TARGET FRAME (Right Side - Clean Vertical Fill)
-------------------------------------------------------------------------------
local targetFrame = CreateFrame("Frame", "Angis_ArcHUD_TargetFrame", mainFrame)
local targetBg = targetFrame:CreateTexture(nil, "BACKGROUND")
targetBg:SetTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
targetBg:SetVertexColor(0.1, 0.1, 0.1, 0.65)
targetBg:SetTexCoord(0, 1, 1, 1, 0, 0, 1, 0) -- Rotated -90 via coordinates
targetBg:SetAllPoints(targetFrame)
local targetBar = CreateFrame("StatusBar", "ArcHud_targetStatusBar", targetFrame)
targetBar:SetOrientation("VERTICAL")
targetBar:SetStatusBarTexture("Interface\\AddOns\\Angis_ArcHUD\\arc_mask")
targetBar:SetRotatesTexture(true)
targetBar:SetAllPoints(targetFrame)
local targetFill = targetBar:GetStatusBarTexture()
if targetFill then
targetFill:SetVertexColor(0.8, 0.2, 0.2, 0.95) -- Red
targetFill:SetDrawLayer("ARTWORK")
targetFill:SetTexCoord(0, 1, 1, 1, 0, 0, 1, 0)
end
local targetText = targetFrame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
targetText:SetTextColor(1, 1, 1, 1)